clutter/timeline: Warn if started with a detached actor

The timeline can't find a frame clock if the actor is detached, so warn
if that happens.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1285
This commit is contained in:
Jonas Ådahl 2020-07-02 19:36:02 +02:00
parent 5b0a7b3a33
commit 06781985e4

View File

@ -1371,7 +1371,8 @@ clutter_timeline_start (ClutterTimeline *timeline)
if (priv->duration == 0) if (priv->duration == 0)
return; return;
g_warn_if_fail (priv->actor || priv->frame_clock); g_warn_if_fail ((priv->actor && clutter_actor_get_stage (priv->actor)) ||
priv->frame_clock);
if (priv->delay) if (priv->delay)
priv->delay_id = clutter_threads_add_timeout (priv->delay, priv->delay_id = clutter_threads_add_timeout (priv->delay,