]> git.0d.be Git - empathy.git/commitdiff
empathy_dispatch_operation_dispose: fix crash when disconnecting the ready signal
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Wed, 11 Nov 2009 16:20:01 +0000 (16:20 +0000)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Wed, 11 Nov 2009 17:01:32 +0000 (17:01 +0000)
We were trying to disconnect the wrong signal and it should be
disconnected before unrefing channel_wrapper.

libempathy/empathy-dispatch-operation.c

index 7eda94d35a737d86c6c4d6bd4500e4e18a82c0c1..20ebadb83c611c81f5a6a9d83ea25afb91b92c4a 100644 (file)
@@ -373,18 +373,16 @@ empathy_dispatch_operation_dispose (GObject *object)
 
   g_object_unref (priv->connection);
 
-  if (priv->channel_wrapper != NULL)
-    g_object_unref (priv->channel_wrapper);
-
   if (priv->ready_handler != 0)
     g_signal_handler_disconnect (priv->channel_wrapper,
-      priv->invalidated_handler);
+      priv->ready_handler);
 
+  if (priv->channel_wrapper != NULL)
+    g_object_unref (priv->channel_wrapper);
 
   g_signal_handler_disconnect (priv->channel, priv->invalidated_handler);
   g_object_unref (priv->channel);
 
-
   if (priv->contact != NULL)
     g_object_unref (priv->contact);