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:
parent
1f1538be76
commit
0ab5ff6eed
1 changed files with 2 additions and 2 deletions
|
@ -355,7 +355,7 @@ clutter_transition_set_animatable (ClutterTransition *transition,
|
|||
ClutterAnimatable *animatable)
|
||||
{
|
||||
ClutterTransitionPrivate *priv;
|
||||
ClutterActor *actor;
|
||||
ClutterActor *actor = NULL;
|
||||
|
||||
g_return_if_fail (CLUTTER_IS_TRANSITION (transition));
|
||||
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);
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue