[clutter/clutter-1.8] gesture-action: Protect against NULL pointers
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter/clutter-1.8] gesture-action: Protect against NULL pointers
- Date: Mon, 30 Jan 2012 12:38:38 +0000 (UTC)
commit 55fe293b2f4e9ee73b74557b272384cd7ba8223b
Author: Emmanuele Bassi <ebassi gnome org>
Date: Thu Jan 12 10:49:16 2012 +0000
gesture-action: Protect against NULL pointers
(cherry picked from commit 0c365f9f4c920274e1c1b8190b6bc804260355c6)
Signed-off-by: Emmanuele Bassi <ebassi linux intel com>
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 4210b61..24f2298 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]