Bug 1299 - clutter_score_remove will segmentation fault if

timelines are more than 52 and continue to remove them

	* clutter/clutter-score.c (traverse_children): Don't destroy the
	entry in the handler for REMOVE_BY_ID. It will be removed again
	anyway in the call to g_node_traverse. This was causing a
	crash. Thanks to zhangwei for spotting.
This commit is contained in:
Neil Roberts 2008-11-25 13:19:48 +00:00
parent 596d4628e6
commit 50868579a0
2 changed files with 14 additions and 17 deletions

View File

@ -1,3 +1,13 @@
2008-11-25 Neil Roberts <neil@linux.intel.com>
Bug 1299 - clutter_score_remove will segmentation fault if
timelines are more than 52 and continue to remove them
* clutter/clutter-score.c (traverse_children): Don't destroy the
entry in the handler for REMOVE_BY_ID. It will be removed again
anyway in the call to g_node_traverse. This was causing a
crash. Thanks to zhangwei for spotting.
2008-11-24 Neil Roberts <neil@linux.intel.com>
Add a wrapper library to help testing without NPOTs.

View File

@ -505,30 +505,17 @@ traverse_children (GNode *node,
case REMOVE_BY_ID:
if (closure->d.id == entry->id)
{
if (entry->complete_id)
{
g_signal_handler_disconnect (entry->timeline, entry->complete_id);
entry->complete_id = 0;
}
if (entry->marker_id)
{
g_signal_handler_disconnect (entry->timeline, entry->marker_id);
entry->marker_id = 0;
}
g_object_unref (entry->timeline);
/* Destroy all the child entries of this node */
g_node_traverse (node,
G_POST_ORDER,
G_TRAVERSE_ALL,
-1,
destroy_entry, NULL);
g_free (entry->marker);
g_slice_free (ClutterScoreEntry, entry);
/* Keep track of this node so that it will be destroyed
further up */
closure->result = node;
retval = TRUE;
}
break;