forked from AuroraMiddleware/gtk
widget: Take a ref during ::unmap emission
This ensures the widget data stays live long enough to perform invariants check after emission if the widget happens to be destroyed on a callback. https://bugzilla.gnome.org/show_bug.cgi?id=745829
This commit is contained in:
parent
2e272106ef
commit
f5f6ad9981
@ -5081,6 +5081,7 @@ gtk_widget_unmap (GtkWidget *widget)
|
||||
|
||||
if (gtk_widget_get_mapped (widget))
|
||||
{
|
||||
g_object_ref (widget);
|
||||
gtk_widget_push_verify_invariants (widget);
|
||||
|
||||
if (!gtk_widget_get_has_window (widget))
|
||||
@ -5093,6 +5094,7 @@ gtk_widget_unmap (GtkWidget *widget)
|
||||
g_signal_emit (widget, widget_signals[UNMAP], 0);
|
||||
|
||||
gtk_widget_pop_verify_invariants (widget);
|
||||
g_object_unref (widget);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user