From 420dcf74373609505b9815c909394ad5e2f5c0f6 Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Fri, 1 Aug 2008 11:09:31 +0000 Subject: [PATCH] Bug 1069 - Warnings with ClutterScore * clutter/clutter-score.c (clutter_score_is_playing): Check whether priv->running_timelines is NULL before checking its length. (foreach_running_timeline): Remove the completed signal handler when stopping the score. Otherwise the completed callback will get called multiple times if the timeline is started later. --- ChangeLog | 11 +++++++++++ clutter/clutter-score.c | 8 +++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 044d4ffc4..5300a2efb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2008-08-01 Neil Roberts + + Bug 1069 - Warnings with ClutterScore + + * clutter/clutter-score.c (clutter_score_is_playing): Check + whether priv->running_timelines is NULL before checking its + length. + (foreach_running_timeline): Remove the completed signal handler + when stopping the score. Otherwise the completed callback will get + called multiple times if the timeline is started later. + 2008-07-31 Neil Roberts Bug 1075 - Difficult to bind clutter_stage_new diff --git a/clutter/clutter-score.c b/clutter/clutter-score.c index 6f7400160..0db3c8d2a 100644 --- a/clutter/clutter-score.c +++ b/clutter/clutter-score.c @@ -409,7 +409,8 @@ clutter_score_is_playing (ClutterScore *score) if (score->priv->is_paused) return FALSE; - return (g_hash_table_size (score->priv->running_timelines) != 0); + return score->priv->running_timelines + && g_hash_table_size (score->priv->running_timelines) != 0; } /* destroy_entry: @@ -728,6 +729,11 @@ foreach_running_timeline (gpointer key, break; case ACTION_STOP: + if (entry->complete_id) + { + g_signal_handler_disconnect (entry->timeline, entry->complete_id); + entry->complete_id = 0; + } clutter_timeline_stop (entry->timeline); break; }