win32: Don't dereference keyboard_grab if it is NULL

This fixes a crash in e.g. testdnd
This commit is contained in:
Alexander Larsson 2011-11-21 14:37:57 +01:00
parent 4760b3e2bd
commit 0d94b974b3

View File

@ -2730,7 +2730,8 @@ gdk_event_translate (MSG *msg,
gdk_pointer_ungrab (msg->time); gdk_pointer_ungrab (msg->time);
} }
if (keyboard_grab->window == window) if (keyboard_grab != NULL &&
keyboard_grab->window == window)
gdk_keyboard_ungrab (msg->time); gdk_keyboard_ungrab (msg->time);
} }