[empathy] empathy_send_file_with_file_chooser: keep on the contact while the dialog is running



commit ef153cb591ba0965a5bd43ef843657ea4c1313e3
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date:   Tue Aug 2 16:15:13 2011 +0200

    empathy_send_file_with_file_chooser: keep on the contact while the dialog is running
    
    It's not safe to assume that the EmpathyContact stays alive.

 libempathy-gtk/empathy-ui-utils.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/libempathy-gtk/empathy-ui-utils.c b/libempathy-gtk/empathy-ui-utils.c
index a1d4d95..810bbfc 100644
--- a/libempathy-gtk/empathy-ui-utils.c
+++ b/libempathy-gtk/empathy-ui-utils.c
@@ -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);
 }



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