[gtk+/xi2] gdk_device_get_history: Nullify events/n_events when returning FALSE.



commit 15fbbd82c69e9df0a9244a413f2660d5bf18e2c3
Author: Carlos Garnacho <carlosg gnome org>
Date:   Sun May 16 21:24:07 2010 +0200

    gdk_device_get_history: Nullify events/n_events when returning FALSE.

 gdk/gdkdevice.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/gdk/gdkdevice.c b/gdk/gdkdevice.c
index eea1ab3..d326753 100644
--- a/gdk/gdkdevice.c
+++ b/gdk/gdkdevice.c
@@ -392,6 +392,15 @@ gdk_device_get_history (GdkDevice      *device,
   g_return_val_if_fail (GDK_IS_DEVICE (device), FALSE);
   g_return_val_if_fail (GDK_IS_WINDOW (window), FALSE);
 
+  if (n_events)
+    *n_events = 0;
+
+  if (events)
+    *events = NULL;
+
+  if (GDK_WINDOW_DESTROYED (window))
+    return FALSE;
+
   if (!GDK_DEVICE_GET_CLASS (device)->get_history)
     return FALSE;
 



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