[gtk+] quartz: GdkDeviceCore: check for NULL pointer



commit 2e7f14c90f02144a572ced04e0c9b5016e6b46ce
Author: Kristian Rietveld <kris gtk org>
Date:   Wed Dec 22 17:08:25 2010 +0100

    quartz: GdkDeviceCore: check for NULL pointer

 gdk/quartz/gdkdevice-core.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/gdk/quartz/gdkdevice-core.c b/gdk/quartz/gdkdevice-core.c
index 3244a43..65c24fa 100644
--- a/gdk/quartz/gdkdevice-core.c
+++ b/gdk/quartz/gdkdevice-core.c
@@ -241,8 +241,11 @@ gdk_device_core_query_state_helper (GdkWindow       *window,
     translate_coords_to_child_coords (window, found_window,
                                       &x_tmp, &y_tmp);
 
-  *x = x_tmp;
-  *y = y_tmp;
+  if (x)
+    *x = x_tmp;
+
+  if (y)
+    *y = y_tmp;
 
   return found_window;
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]