Don't crash if window->parent is NULL

This happens for events on the root window.
This commit is contained in:
Alexander Larsson 2009-01-28 12:49:46 +01:00 committed by Alexander Larsson
parent d9fcda1072
commit 6e56179b03

View 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;