[gtk+] win32: Don't dereference keyboard_grab if it is NULL
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] win32: Don't dereference keyboard_grab if it is NULL
- Date: Mon, 21 Nov 2011 14:05:16 +0000 (UTC)
commit 0d94b974b3e7564b130fe5960a636bae9fa08a1d
Author: Alexander Larsson <alexl redhat com>
Date: Mon Nov 21 14:37:57 2011 +0100
win32: Don't dereference keyboard_grab if it is NULL
This fixes a crash in e.g. testdnd
gdk/win32/gdkevents-win32.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gdk/win32/gdkevents-win32.c b/gdk/win32/gdkevents-win32.c
index 16d8195..83adae6 100644
--- a/gdk/win32/gdkevents-win32.c
+++ b/gdk/win32/gdkevents-win32.c
@@ -2730,7 +2730,8 @@ gdk_event_translate (MSG *msg,
gdk_pointer_ungrab (msg->time);
}
- if (keyboard_grab->window == window)
+ if (keyboard_grab != NULL &&
+ keyboard_grab->window == window)
gdk_keyboard_ungrab (msg->time);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]