[empathy/gnome-2-34] tp_chat_got_renamed_contacts_cb: use tp_clear_object() to unref priv->user



commit 93519f10b6c247017920a39fc0122c3310bfe062
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date:   Wed Mar 23 14:26:29 2011 +0100

    tp_chat_got_renamed_contacts_cb: use tp_clear_object() to unref priv->user
    
    If priv->user and old are both NULL, we used to crash.

 libempathy/empathy-tp-chat.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/libempathy/empathy-tp-chat.c b/libempathy/empathy-tp-chat.c
index 5616423..462f8a7 100644
--- a/libempathy/empathy-tp-chat.c
+++ b/libempathy/empathy-tp-chat.c
@@ -1090,7 +1090,7 @@ tp_chat_got_renamed_contacts_cb (TpConnection            *connection,
 
 	if (priv->user == old) {
 		/* We change our nick */
-		g_object_unref (priv->user);
+		tp_clear_object (&priv->user);
 		priv->user = g_object_ref (new);
 	}
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]