]> Pileus Git - ~andy/gtk/commitdiff
Don't crash if window->parent is NULL
authorAlexander Larsson <alexl@redhat.com>
Wed, 28 Jan 2009 11:49:46 +0000 (12:49 +0100)
committerAlexander Larsson <alex@localhost.localdomain>
Thu, 2 Apr 2009 08:15:28 +0000 (10:15 +0200)
This happens for events on the root window.

gdk/gdkwindow.c

index 6b0ac94fca1616c2d8abaa85cac8557c794ba85a..b3521504d6d07877774fec0cb8cbfa3ca49bd3f2 100644 (file)
@@ -8489,7 +8489,8 @@ _gdk_windowing_got_event (GdkDisplay *display,
        is_motion_type (event->type)))
     return;
 
-  if (GDK_WINDOW_TYPE (event_private->parent) != GDK_WINDOW_ROOT)
+  if (event_private->parent != NULL &&
+      GDK_WINDOW_TYPE (event_private->parent) != GDK_WINDOW_ROOT)
     {
       GEnumValue *event_type_value, *window_type_value;