forked from AuroraMiddleware/gtk
window: Unset source ID before possibly destroying the widget
If the delete event ends up destroying the widget, unsetting priv->delete_event_handler will happen on invalid memory, so unset it before the widget is possibly destroyed. https://bugzilla.gnome.org/show_bug.cgi?id=726825
This commit is contained in:
parent
0e7884f1a7
commit
9adfc8e2c4
@ -1303,12 +1303,11 @@ send_delete_event (gpointer data)
|
||||
|
||||
event->any.window = g_object_ref (gtk_widget_get_window (window));
|
||||
event->any.send_event = TRUE;
|
||||
priv->delete_event_handler = 0;
|
||||
|
||||
gtk_main_do_event (event);
|
||||
gdk_event_free (event);
|
||||
|
||||
priv->delete_event_handler = 0;
|
||||
|
||||
return G_SOURCE_REMOVE;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user