summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Ralls <jralls@ceridwen.us>2013-10-11 17:40:50 (GMT)
committerJohn Ralls <jralls@ceridwen.us>2013-10-11 17:54:15 (GMT)
commitcf66cf906ec148ffbfa586b8e465d15b066412ae (patch)
treeb50b75af3a1eabc4aa267a7912224e61945e604e
parentd0065270ac1ec01f597a924d157ad2f1d50f3580 (diff)
downloadgtk-cf66cf906ec148ffbfa586b8e465d15b066412ae.tar.gz
gtk-cf66cf906ec148ffbfa586b8e465d15b066412ae.tar.xz
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.
-rw-r--r--gdk/gdkwindow.c5
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 */