[gtk+/xi2] gdk_event_get_device(): Add NULL check.



commit 61f28dc31832ac54cd9c9ce52e08d34a65307630
Author: Carlos Garnacho <carlos gnome org>
Date:   Thu Dec 10 22:37:57 2009 +0100

    gdk_event_get_device(): Add NULL check.

 gdk/gdkevents.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/gdk/gdkevents.c b/gdk/gdkevents.c
index b57874b..c7d1340 100644
--- a/gdk/gdkevents.c
+++ b/gdk/gdkevents.c
@@ -930,6 +930,8 @@ gdk_event_get_axis (const GdkEvent *event,
 GdkDevice *
 gdk_event_get_device (const GdkEvent *event)
 {
+  g_return_val_if_fail (event != NULL, NULL);
+
   switch (event->type)
     {
     case GDK_MOTION_NOTIFY:



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