aboutsummaryrefslogtreecommitdiffstats
path: root/modules/calendar/e-cal-shell-view.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-06-11 04:37:03 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-06-11 04:43:38 +0800
commit54384b72172d92bb69d136b564a6096978f50695 (patch)
treef4a7bbb042ca773843cb833f06ae055783a8e202 /modules/calendar/e-cal-shell-view.c
parent243f84d37d2391ef58680ef2341ed35139104642 (diff)
downloadgsoc2013-evolution-54384b72172d92bb69d136b564a6096978f50695.tar
gsoc2013-evolution-54384b72172d92bb69d136b564a6096978f50695.tar.gz
gsoc2013-evolution-54384b72172d92bb69d136b564a6096978f50695.tar.bz2
gsoc2013-evolution-54384b72172d92bb69d136b564a6096978f50695.tar.lz
gsoc2013-evolution-54384b72172d92bb69d136b564a6096978f50695.tar.xz
gsoc2013-evolution-54384b72172d92bb69d136b564a6096978f50695.tar.zst
gsoc2013-evolution-54384b72172d92bb69d136b564a6096978f50695.zip
ECalShellView: Disconnect "prepare-for-quit" handler on dispose().
This is another source of crashes after creating and destroying a second shell window. The signal handler was left connected with the destroyed shell window as the closure.
Diffstat (limited to 'modules/calendar/e-cal-shell-view.c')
-rw-r--r--modules/calendar/e-cal-shell-view.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/calendar/e-cal-shell-view.c b/modules/calendar/e-cal-shell-view.c
index a6e347528d..39f1472dbb 100644
--- a/modules/calendar/e-cal-shell-view.c
+++ b/modules/calendar/e-cal-shell-view.c
@@ -101,6 +101,7 @@ cal_shell_view_constructed (GObject *object)
ECalShellContent *cal_shell_content;
GtkWidget *container;
GtkWidget *widget;
+ gulong handler_id;
/* Chain up to parent's constructed() method. */
G_OBJECT_CLASS (parent_class)->constructed (object);
@@ -126,10 +127,13 @@ cal_shell_view_constructed (GObject *object)
gtk_container_add (GTK_CONTAINER (container), widget);
gtk_widget_show (widget);
- g_signal_connect (
+ handler_id = g_signal_connect (
shell, "prepare-for-quit",
G_CALLBACK (cal_shell_view_prepare_for_quit_cb),
cal_shell_view);
+
+ cal_shell_view->priv->shell = g_object_ref (shell);
+ cal_shell_view->priv->prepare_for_quit_handler_id = handler_id;
}
static void