mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-23 20:30:15 +00:00
Don't access the user data on destroyed windows, since at best it can be a
2005-08-19 Matthias Clasen <mclasen@redhat.com> * gtk/gtkmain.c (gtk_get_event_widget): Don't access the user data on destroyed windows, since at best it can be a stale pointer. (#313953, Robin Green)
This commit is contained in:
parent
e20eb8b760
commit
37ef7f0389
@ -1,3 +1,9 @@
|
||||
2005-08-19 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkmain.c (gtk_get_event_widget): Don't access
|
||||
the user data on destroyed windows, since at best
|
||||
it can be a stale pointer. (#313953, Robin Green)
|
||||
|
||||
2005-08-19 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkhsv.c (paint_triangle): Avoid a buffer overrun.
|
||||
|
@ -1,3 +1,9 @@
|
||||
2005-08-19 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkmain.c (gtk_get_event_widget): Don't access
|
||||
the user data on destroyed windows, since at best
|
||||
it can be a stale pointer. (#313953, Robin Green)
|
||||
|
||||
2005-08-19 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkhsv.c (paint_triangle): Avoid a buffer overrun.
|
||||
|
@ -1,3 +1,9 @@
|
||||
2005-08-19 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkmain.c (gtk_get_event_widget): Don't access
|
||||
the user data on destroyed windows, since at best
|
||||
it can be a stale pointer. (#313953, Robin Green)
|
||||
|
||||
2005-08-19 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkhsv.c (paint_triangle): Avoid a buffer overrun.
|
||||
|
@ -69,6 +69,8 @@
|
||||
#include "gtkdebug.h"
|
||||
#include "gtkalias.h"
|
||||
|
||||
#include "gdk/gdkprivate.h" /* for GDK_WINDOW_DESTROYED */
|
||||
|
||||
/* Private type definitions
|
||||
*/
|
||||
typedef struct _GtkInitFunction GtkInitFunction;
|
||||
@ -2041,7 +2043,8 @@ gtk_get_event_widget (GdkEvent *event)
|
||||
GtkWidget *widget;
|
||||
|
||||
widget = NULL;
|
||||
if (event && event->any.window)
|
||||
if (event && event->any.window &&
|
||||
!GDK_WINDOW_DESTROYED (event->any.window))
|
||||
gdk_window_get_user_data (event->any.window, (void**) &widget);
|
||||
|
||||
return widget;
|
||||
|
Loading…
Reference in New Issue
Block a user