summaryrefslogtreecommitdiff
path: root/gdk
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2009-08-27 13:34:00 +0200
committerAlexander Larsson <alexl@redhat.com>2009-08-27 13:34:00 +0200
commit858e6bcd658b060757cc88d8106518540ec432b8 (patch)
treeb1bfd758ccc088e6afb26a7fb99714b3feacbaab /gdk
parent1932f32ef201268272bff03c590766d1448ddcc8 (diff)
downloadgtk+-858e6bcd658b060757cc88d8106518540ec432b8.tar.gz
Allow x and y to be NULL in gdk_window_get_geometry
Fixes a crash reported in bug #593249
Diffstat (limited to 'gdk')
-rw-r--r--gdk/gdkwindow.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 08317046b9..fa8e63c8ab 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -7368,8 +7368,10 @@ gdk_window_get_geometry (GdkWindow *window,
parent = private->parent;
if (parent && !gdk_window_has_impl (parent))
{
- *x -= parent->abs_x;
- *y -= parent->abs_y;
+ if (x)
+ *x -= parent->abs_x;
+ if (y)
+ *y -= parent->abs_y;
}
}
else