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.
This commit is contained in:
Neil Roberts 2008-08-01 11:09:31 +00:00
parent 1e84798546
commit 420dcf7437
2 changed files with 18 additions and 1 deletions

View File

@ -1,3 +1,14 @@
2008-08-01 Neil Roberts <neil@o-hand.com>
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 <neil@o-hand.com>
Bug 1075 - Difficult to bind clutter_stage_new

View File

@ -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;
}