clutter/transition: Do not call methods of a NULL ClutterAnimatable
Only call clutter_animatable_get_actor on a non-null object, otherwise set the timeline actor to NULL directly. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3750>
This commit is contained in:
@@ -355,7 +355,7 @@ clutter_transition_set_animatable (ClutterTransition *transition,
|
|||||||
ClutterAnimatable *animatable)
|
ClutterAnimatable *animatable)
|
||||||
{
|
{
|
||||||
ClutterTransitionPrivate *priv;
|
ClutterTransitionPrivate *priv;
|
||||||
ClutterActor *actor;
|
ClutterActor *actor = NULL;
|
||||||
|
|
||||||
g_return_if_fail (CLUTTER_IS_TRANSITION (transition));
|
g_return_if_fail (CLUTTER_IS_TRANSITION (transition));
|
||||||
g_return_if_fail (animatable == NULL || CLUTTER_IS_ANIMATABLE (animatable));
|
g_return_if_fail (animatable == NULL || CLUTTER_IS_ANIMATABLE (animatable));
|
||||||
@@ -374,9 +374,9 @@ clutter_transition_set_animatable (ClutterTransition *transition,
|
|||||||
{
|
{
|
||||||
priv->animatable = g_object_ref (animatable);
|
priv->animatable = g_object_ref (animatable);
|
||||||
clutter_transition_attach (transition, priv->animatable);
|
clutter_transition_attach (transition, priv->animatable);
|
||||||
|
actor = clutter_animatable_get_actor (animatable);
|
||||||
}
|
}
|
||||||
|
|
||||||
actor = clutter_animatable_get_actor (animatable);
|
|
||||||
clutter_timeline_set_actor (CLUTTER_TIMELINE (transition), actor);
|
clutter_timeline_set_actor (CLUTTER_TIMELINE (transition), actor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user