diff --git a/gtk/gtkactionmuxer.c b/gtk/gtkactionmuxer.c index 303d26e738..26ca311efc 100644 --- a/gtk/gtkactionmuxer.c +++ b/gtk/gtkactionmuxer.c @@ -858,6 +858,8 @@ gtk_action_muxer_dispose (GObject *object) g_hash_table_remove_all (muxer->observed_actions); + muxer->widget = NULL; + G_OBJECT_CLASS (gtk_action_muxer_parent_class) ->dispose (object); } diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index 6d25c73357..48ead879f0 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -7357,6 +7357,11 @@ gtk_widget_dispose (GObject *object) GtkWidget *widget = GTK_WIDGET (object); GtkWidgetPrivate *priv = gtk_widget_get_instance_private (widget); GSList *sizegroups; + GtkActionMuxer *muxer; + + muxer = g_object_get_qdata (G_OBJECT (widget), quark_action_muxer); + if (muxer != NULL) + g_object_run_dispose (G_OBJECT (muxer)); if (priv->children_observer) gtk_list_list_model_clear (priv->children_observer);