Don't crash on NULL parent

The parent window can be NULL, check for that before dereferencing.
This commit is contained in:
Alexander Larsson
2009-08-17 16:59:47 +02:00
parent 155140160c
commit f7185ec704

View File

@ -7295,7 +7295,7 @@ gdk_window_get_geometry (GdkWindow *window,
/* This reports the position wrt to the native parent, we need to convert
it to be relative to the client side parent */
parent = private->parent;
if (!gdk_window_has_impl (parent))
if (parent && !gdk_window_has_impl (parent))
{
*x -= parent->abs_x;
*y -= parent->abs_y;