From 62cfc6487fc2f3ccd4e1cfdd71bd2746ed833b61 Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Mon, 5 Jan 2009 12:52:46 +0000 Subject: [PATCH] Fix setting the mode on a ClutterAlpha created with animation_set_alpha(NULL) It previously attempted to set the mode on the alpha using clutter_animation_set_mode_internal, but this was setting the mode on priv->alpha. At that point in the code priv->alpha is always NULL. clutter_animation_set_mode_internal now takes a parameter to specify which alpha to modify. --- clutter/clutter-animation.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/clutter/clutter-animation.c b/clutter/clutter-animation.c index 8384505..4dc1aed 100644 --- a/clutter/clutter-animation.c +++ b/clutter/clutter-animation.c @@ -780,12 +780,11 @@ clutter_animation_get_actor (ClutterAnimation *animation) } static inline void -clutter_animation_set_mode_internal (ClutterAnimation *animation) +clutter_animation_set_mode_internal (ClutterAnimation *animation, + ClutterAlpha *alpha) { ClutterAnimationPrivate *priv = animation->priv; - ClutterAlpha *alpha; - alpha = clutter_animation_get_alpha (animation); if (alpha) clutter_alpha_set_mode (alpha, priv->mode); } @@ -810,7 +809,7 @@ clutter_animation_set_mode (ClutterAnimation *animation, priv = animation->priv; priv->mode = mode; - clutter_animation_set_mode_internal (animation); + clutter_animation_set_mode_internal (animation, priv->alpha); g_object_notify (G_OBJECT (animation), "mode"); } @@ -1066,7 +1065,7 @@ clutter_animation_set_alpha (ClutterAnimation *animation, alpha = clutter_alpha_new (); clutter_alpha_set_timeline (alpha, timeline); - clutter_animation_set_mode_internal (animation); + clutter_animation_set_mode_internal (animation, alpha); } priv->alpha = g_object_ref_sink (alpha); -- 2.7.4