summaryrefslogtreecommitdiff
path: root/gdk/gdkwindow.c
diff options
context:
space:
mode:
authorPhilip Withnall <philip.withnall@collabora.co.uk>2013-11-20 17:18:16 +0000
committerPhilip Withnall <philip.withnall@collabora.co.uk>2015-03-09 13:41:37 +0000
commit586240d2f8ef5408c24b5636047487e844f309ee (patch)
tree16cce637b2ff94d3ae3e95e571f32d71ed91efe6 /gdk/gdkwindow.c
parente99e282b5ae9190f859c6b4d3107031d5474431f (diff)
downloadgtk+-586240d2f8ef5408c24b5636047487e844f309ee.tar.gz
gdkwindow: Fix potential NULL pointer dereference
gdk_window_ensure_native() can end up with a NULL parent pointer, which it passes to find_native_parent_above()…but that expects a non-NULL parent. Found with scan-build. https://bugzilla.gnome.org/show_bug.cgi?id=712760
Diffstat (limited to 'gdk/gdkwindow.c')
-rw-r--r--gdk/gdkwindow.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 9ab1f8a80d..a5174a75d0 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -1110,6 +1110,9 @@ find_native_sibling_above (GdkWindow *parent,
{
GdkWindow *w;
+ if (!parent)
+ return NULL;
+
w = find_native_sibling_above_helper (parent, child);
if (w)
return w;