[clutter] gesture-action: Protect against NULL pointers



commit 0c365f9f4c920274e1c1b8190b6bc804260355c6
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Thu Jan 12 10:49:16 2012 +0000

    gesture-action: Protect against NULL pointers

 clutter/clutter-gesture-action.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/clutter/clutter-gesture-action.c b/clutter/clutter-gesture-action.c
index fe1dff1..15da745 100644
--- a/clutter/clutter-gesture-action.c
+++ b/clutter/clutter-gesture-action.c
@@ -250,13 +250,17 @@ clutter_gesture_action_set_actor (ClutterActorMeta *meta,
     {
       ClutterActor *old_actor = clutter_actor_meta_get_actor (meta);
 
-      g_signal_handler_disconnect (old_actor, priv->actor_capture_id);
+      if (old_actor != NULL)
+        g_signal_handler_disconnect (old_actor, priv->actor_capture_id);
+
       priv->actor_capture_id = 0;
     }
 
   if (priv->stage_capture_id != 0)
     {
-      g_signal_handler_disconnect (priv->stage, priv->stage_capture_id);
+      if (priv->stage != NULL)
+        g_signal_handler_disconnect (priv->stage, priv->stage_capture_id);
+
       priv->stage_capture_id = 0;
       priv->stage = NULL;
     }



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