[animation] Keep a reference during notify::alpha
The Animation should be referenced during the notification of the alpha value, since the callback is invoked depending on the Alpha and it won't vivify the Animation instance for us. Fixes bug: http://bugzilla.openedhand.com/show_bug.cgi?id=1537
This commit is contained in:
parent
41e85f3073
commit
fd19d33746
@ -777,12 +777,17 @@ on_alpha_notify (GObject *gobject,
|
||||
GParamSpec *pspec,
|
||||
ClutterAnimation *animation)
|
||||
{
|
||||
ClutterAnimationPrivate *priv = animation->priv;
|
||||
ClutterAnimationPrivate *priv;
|
||||
GList *properties, *p;
|
||||
gdouble alpha_value;
|
||||
gboolean is_animatable = FALSE;
|
||||
ClutterAnimatable *animatable = NULL;
|
||||
|
||||
/* make sure the animation survives the notification */
|
||||
g_object_ref (animation);
|
||||
|
||||
priv = animation->priv;
|
||||
|
||||
alpha_value = clutter_alpha_get_alpha (CLUTTER_ALPHA (gobject));
|
||||
|
||||
if (CLUTTER_IS_ANIMATABLE (priv->object))
|
||||
@ -835,6 +840,8 @@ on_alpha_notify (GObject *gobject,
|
||||
g_list_free (properties);
|
||||
|
||||
g_object_thaw_notify (priv->object);
|
||||
|
||||
g_object_unref (animation);
|
||||
}
|
||||
|
||||
static ClutterAlpha *
|
||||
|
Loading…
Reference in New Issue
Block a user