[gtk+] Ensure src and dest are GdkWindows in _gdk_sythesize_crossing_events
- From: John Ralls <jralls src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Ensure src and dest are GdkWindows in _gdk_sythesize_crossing_events
- Date: Fri, 11 Oct 2013 17:54:57 +0000 (UTC)
commit cf66cf906ec148ffbfa586b8e465d15b066412ae
Author: John Ralls <jralls ceridwen us>
Date: Fri Oct 11 10:40:50 2013 -0700
Ensure src and dest are GdkWindows in _gdk_sythesize_crossing_events
Discovered via a crash because b's (dest's) toplevel was NULL;
ensuring that the dest is actually a GdkWindow or setting b to NULL
prevents that path from being taken.
gdk/gdkwindow.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 6d2bd68..b16f283 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -7570,8 +7570,9 @@ _gdk_synthesize_crossing_events (GdkDisplay *display,
/* TODO: Don't send events to toplevel, as we get those from the windowing system */
- a = src;
- b = dest;
+ a = (src && GDK_IS_WINDOW (src)) ? src : NULL;
+ b = (dest && GDK_IS_WINDOW (dest)) ? dest : NULL;
+
if (src == dest)
return; /* No crossings generated between src and dest */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]