From 378393285bb5de21c4da85b2e64e044faef6f5b6 Mon Sep 17 00:00:00 2001 From: Danielle Madeley Date: Tue, 20 Sep 2011 16:32:33 +1000 Subject: Don't destroy MainWindow on delete-event, just hide it This stops MainWindow being unreferenced, and prevents crashes caused by things which then try to use it. Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=659118 --- src/empathy-main-window.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/empathy-main-window.c b/src/empathy-main-window.c index 679f000e0..0e75b1cbe 100644 --- a/src/empathy-main-window.c +++ b/src/empathy-main-window.c @@ -2122,6 +2122,10 @@ empathy_main_window_init (EmpathyMainWindow *window) gtk_window_set_role (GTK_WINDOW (window), "contact_list"); gtk_window_set_default_size (GTK_WINDOW (window), 225, 325); + /* don't finalize the widget on delete-event, just hide it */ + g_signal_connect (window, "delete-event", + G_CALLBACK (gtk_widget_hide_on_delete), NULL); + /* Set up interface */ filename = empathy_file_lookup ("empathy-main-window.ui", "src"); gui = empathy_builder_get_file (filename, -- cgit v1.2.3