[mutter] clutter/timeline: Warn if started with a detached actor



commit 06781985e495a4aa13a911c425db501bb4a21146
Author: Jonas Ã…dahl <jadahl gmail com>
Date:   Thu Jul 2 19:36:02 2020 +0200

    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

 clutter/clutter/clutter-timeline.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/clutter/clutter/clutter-timeline.c b/clutter/clutter/clutter-timeline.c
index bc29f8e24c..265a09b5be 100644
--- a/clutter/clutter/clutter-timeline.c
+++ b/clutter/clutter/clutter-timeline.c
@@ -1371,7 +1371,8 @@ clutter_timeline_start (ClutterTimeline *timeline)
   if (priv->duration == 0)
     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)
     priv->delay_id = clutter_threads_add_timeout (priv->delay,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]