aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanielle Madeley <danielle.madeley@collabora.co.uk>2011-09-20 14:32:33 +0800
committerDanielle Madeley <danielle.madeley@collabora.co.uk>2011-09-20 14:32:33 +0800
commit378393285bb5de21c4da85b2e64e044faef6f5b6 (patch)
tree5cd47a18fd51b5328c405fa4bdd0ae1331ce8e8c
parent8a15d7ddcab9c2379e562e3b72e8ec6b11165d25 (diff)
downloadgsoc2013-empathy-378393285bb5de21c4da85b2e64e044faef6f5b6.tar
gsoc2013-empathy-378393285bb5de21c4da85b2e64e044faef6f5b6.tar.gz
gsoc2013-empathy-378393285bb5de21c4da85b2e64e044faef6f5b6.tar.bz2
gsoc2013-empathy-378393285bb5de21c4da85b2e64e044faef6f5b6.tar.lz
gsoc2013-empathy-378393285bb5de21c4da85b2e64e044faef6f5b6.tar.xz
gsoc2013-empathy-378393285bb5de21c4da85b2e64e044faef6f5b6.tar.zst
gsoc2013-empathy-378393285bb5de21c4da85b2e64e044faef6f5b6.zip
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
-rw-r--r--src/empathy-main-window.c4
1 files changed, 4 insertions, 0 deletions
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,