Skip to content

Commit

Permalink
clutter/transition: Do not call methods of a NULL ClutterAnimatable
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
tintou authored and Marge Bot committed May 16, 2024
1 parent 1f1538b commit 0ab5ff6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clutter/clutter/clutter-transition.c
Expand Up @@ -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));
Expand All @@ -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);
}

Expand Down

0 comments on commit 0ab5ff6

Please sign in to comment.