diff options
author | Alexander Larsson <alexl@redhat.com> | 2009-08-17 16:59:47 +0200 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2009-08-17 16:59:47 +0200 |
commit | f7185ec704f0681b3a9ce910a0f35d93549f01e3 (patch) | |
tree | a40e7e6c02c8b046834d90048c828b05e5ca89e5 /gdk | |
parent | 155140160c09eb909208cb48fcd90ad1217b4631 (diff) | |
download | gtk+-f7185ec704f0681b3a9ce910a0f35d93549f01e3.tar.gz |
Don't crash on NULL parent
The parent window can be NULL, check for that before dereferencing.
Diffstat (limited to 'gdk')
-rw-r--r-- | gdk/gdkwindow.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c index b9d0bfff6d..87066087d7 100644 --- a/gdk/gdkwindow.c +++ b/gdk/gdkwindow.c @@ -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; |