[clutter/wip/apocalypses/apocalypse-6] transition: Clear the animatable member when removing on complete



commit 9605e4b48541213312d65bdd11872ae4399e49ac
Author: Emmanuele Bassi <ebassi linux intel com>
Date:   Thu Mar 15 13:53:56 2012 +0000

    transition: Clear the animatable member when removing on complete

 clutter/clutter-transition.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/clutter/clutter-transition.c b/clutter/clutter-transition.c
index 70d9c51..955ba92 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);
         }
     }



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