]> git.0d.be Git - empathy.git/commitdiff
empathy_send_file_with_file_chooser: keep on the contact while the dialog is running
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Tue, 2 Aug 2011 14:15:13 +0000 (16:15 +0200)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Tue, 2 Aug 2011 14:16:18 +0000 (16:16 +0200)
It's not safe to assume that the EmpathyContact stays alive.

libempathy-gtk/empathy-ui-utils.c

index a1d4d95e5e3c300742369241728503ab1dcb7d43..810bbfc265e1af207a708bb2516ca18bf7d3d03c 100644 (file)
@@ -1732,6 +1732,7 @@ file_manager_send_file_response_cb (GtkDialog      *widget,
                g_object_unref (file);
        }
 
+       g_object_unref (contact);
        gtk_widget_destroy (GTK_WIDGET (widget));
 }
 
@@ -1771,7 +1772,7 @@ empathy_send_file_with_file_chooser (EmpathyContact *contact)
 
        g_signal_connect (widget, "response",
                          G_CALLBACK (file_manager_send_file_response_cb),
-                         contact);
+                         g_object_ref (contact));
 
        gtk_widget_show (widget);
 }