From ac931e95060c10dd44d0b6331d0f38e9b777d436 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 8 Apr 2015 20:20:38 -0400 Subject: [PATCH] popover: Remove signal handlers in dispose If we don't, they may get triggered at an inopportune time later, causing us to crash. See https://bugzilla.redhat.com/show_bug.cgi?id=1203499 https://bugzilla.gnome.org/show_bug.cgi?id=747539 --- gtk/gtkpopover.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gtk/gtkpopover.c b/gtk/gtkpopover.c index 97d13aa861..37064c829a 100644 --- a/gtk/gtkpopover.c +++ b/gtk/gtkpopover.c @@ -304,7 +304,10 @@ gtk_popover_dispose (GObject *object) GtkPopoverPrivate *priv = popover->priv; if (priv->window) - _gtk_window_remove_popover (priv->window, GTK_WIDGET (object)); + { + g_signal_handlers_disconnect_by_data (priv->window, popover); + _gtk_window_remove_popover (priv->window, GTK_WIDGET (object)); + } priv->window = NULL;