From c412bfd8dcda3e13f78ce7212fcda7853280a843 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Wed, 27 Aug 2008 12:44:53 +0000 Subject: Always return a new ref in empathy_contact_factory_get_tp_factory. Fixes bug #549545. svn path=/trunk/; revision=1394 --- libempathy/empathy-contact-factory.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libempathy/empathy-contact-factory.c b/libempathy/empathy-contact-factory.c index 2169e7108..e35bc350d 100644 --- a/libempathy/empathy-contact-factory.c +++ b/libempathy/empathy-contact-factory.c @@ -41,12 +41,10 @@ empathy_contact_factory_get_tp_factory (EmpathyContactFactory *factory, tp_factory = g_hash_table_lookup (priv->accounts, account); if (!tp_factory) { tp_factory = empathy_tp_contact_factory_new (account); - g_hash_table_insert (priv->accounts, - g_object_ref (account), - tp_factory); + g_hash_table_insert (priv->accounts, account, tp_factory); } - return tp_factory; + return g_object_ref (tp_factory); } EmpathyContact * -- cgit v1.2.3