[gtk+] Don't crash on NULL parent
- From: Alexander Larsson <alexl src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gtk+] Don't crash on NULL parent
- Date: Mon, 17 Aug 2009 15:01:34 +0000 (UTC)
commit f7185ec704f0681b3a9ce910a0f35d93549f01e3
Author: Alexander Larsson <alexl redhat com>
Date: Mon Aug 17 16:59:47 2009 +0200
Don't crash on NULL parent
The parent window can be NULL, check for that before dereferencing.
gdk/gdkwindow.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index b9d0bff..8706608 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]