[gtk+] Fix a segfault in the event axes demo



commit b6a6729ce1075507abcd28db48f120b6a48f72f2
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Dec 10 21:05:02 2013 -0500

    Fix a segfault in the event axes demo
    
    Seems that pointer_info can be NULL, after all.

 demos/gtk-demo/event_axes.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/demos/gtk-demo/event_axes.c b/demos/gtk-demo/event_axes.c
index 3a761f1..02d138c 100644
--- a/demos/gtk-demo/event_axes.c
+++ b/demos/gtk-demo/event_axes.c
@@ -111,7 +111,8 @@ event_data_new (void)
 static void
 event_data_free (EventData *data)
 {
-  axes_info_free (data->pointer_info);
+  if (data->pointer_info)
+    axes_info_free (data->pointer_info);
   g_hash_table_destroy (data->touch_info);
   g_free (data);
 }


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