From 3638c1efed449a07fb7e6d052ce4110db4b4feeb Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Thu, 15 Mar 2012 13:53:56 +0000 Subject: [PATCH] transition: Clear the animatable member when removing on complete --- clutter/clutter-transition.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/clutter/clutter-transition.c b/clutter/clutter-transition.c index 70d9c5173..955ba92ff 100644 --- a/clutter/clutter-transition.c +++ b/clutter/clutter-transition.c @@ -126,7 +126,7 @@ clutter_transition_completed (ClutterTimeline *timeline) { ClutterTransitionPrivate *priv = CLUTTER_TRANSITION (timeline)->priv; - if (priv->remove_on_complete) + if (priv->animatable != NULL && priv->remove_on_complete) { int n_repeats, cur_repeat; @@ -137,6 +137,7 @@ clutter_transition_completed (ClutterTimeline *timeline) { clutter_transition_detach (CLUTTER_TRANSITION (timeline), priv->animatable); + g_clear_object (&priv->animatable); g_object_unref (timeline); } }