[gtk+] window: Unset source ID before possibly destroying the widget
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] window: Unset source ID before possibly destroying the widget
- Date: Fri, 21 Mar 2014 16:30:24 +0000 (UTC)
commit 9adfc8e2c4c17478d3bfdbedb80846209c7b82aa
Author: Carlos Garnacho <carlosg gnome org>
Date: Fri Mar 21 15:31:40 2014 +0100
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
gtk/gtkwindow.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index d48ecba..3dc1172 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]