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
This commit is contained in:
Philip Withnall 2013-11-20 17:18:16 +00:00
parent e99e282b5a
commit 586240d2f8

View File

@ -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;