From 26ac10366710eb6e60539421ccf88c5e6833a58b Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Wed, 23 Mar 2011 14:26:29 +0100 Subject: 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 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libempathy') diff --git a/libempathy/empathy-tp-chat.c b/libempathy/empathy-tp-chat.c index 86aca446b..6d29807e4 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); } -- cgit v1.2.3