forked from AuroraMiddleware/gtk
muxer: force muxer dispoal as part of widget dispose
We need to cleanup state here immediately so that we do not potentially access the g_class private data after it been finalized. This ensures that the borrowed reference is dropped by the muxer.
This commit is contained in:
parent
c155ac98c8
commit
b5b836668a
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user