Unref TpChat's channel after emitting destroy.
authorWill Thompson <will.thompson@collabora.co.uk>
Mon, 13 Apr 2009 09:34:39 +0000 (09:34 +0000)
committerXavier Claessens <xclaesse@src.gnome.org>
Mon, 13 Apr 2009 09:34:39 +0000 (09:34 +0000)
This allows callbacks connected to "destroy" to call functions which use
priv->channel to work. Fixes Gnome bug #578356.

Signed-off-by: Will Thompson <will.thompson@collabora.co.uk>
svn path=/trunk/; revision=2821

libempathy/empathy-tp-chat.c

index 1329c61beab614b28a5d31bf1ff788087b80dca8..ef0ac6c2d8d83b779c2fb56fb498722319c621bc 100644 (file)
@@ -102,12 +102,11 @@ tp_chat_invalidated_cb (TpProxy       *proxy,
 {
        EmpathyTpChatPriv *priv = GET_PRIV (chat);
 
-       g_object_unref (priv->channel);
-       priv->channel = NULL;
-
        DEBUG ("Channel invalidated: %s", message);
        g_signal_emit (chat, signals[DESTROY], 0);
 
+       g_object_unref (priv->channel);
+       priv->channel = NULL;
 }
 
 static void