[gtk+/client-side-windows: 198/284] Don't crash if window->parent is NULL



commit 6e56179b03f706bf993935d7b5017625cd4e15b8
Author: Alexander Larsson <alexl redhat com>
Date:   Wed Jan 28 12:49:46 2009 +0100

    Don't crash if window->parent is NULL
    
    This happens for events on the root window.
---
 gdk/gdkwindow.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 6b0ac94..b352150 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -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;
       



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]