From 2b4ee9ab548a58784da7ccc710cbbd213a6c45c9 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Fri, 15 Oct 2010 16:05:44 +0100 Subject: [PATCH] actor: Add more checks to the redraw queue --- clutter/clutter-actor.c | 4 ++-- clutter/clutter-stage.c | 14 ++++++++++---- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/clutter/clutter-actor.c b/clutter/clutter-actor.c index 9d8618960..5f6183595 100644 --- a/clutter/clutter-actor.c +++ b/clutter/clutter-actor.c @@ -7648,11 +7648,11 @@ clutter_actor_get_paint_visibility (ClutterActor *actor) static gboolean invalidate_queue_redraw_entry (ClutterActor *self, - void *user_data) + gpointer user_data) { ClutterActorPrivate *priv = self->priv; - if (priv->queue_redraw_entry) + if (priv->queue_redraw_entry != NULL) _clutter_stage_queue_redraw_entry_invalidate (priv->queue_redraw_entry); return TRUE; diff --git a/clutter/clutter-stage.c b/clutter/clutter-stage.c index f51c8dcbd..156f1fd4c 100644 --- a/clutter/clutter-stage.c +++ b/clutter/clutter-stage.c @@ -3237,11 +3237,17 @@ free_queue_redraw_entry (ClutterStageQueueRedrawEntry *entry) } void -_clutter_stage_queue_redraw_entry_invalidate ( - ClutterStageQueueRedrawEntry *entry) +_clutter_stage_queue_redraw_entry_invalidate (ClutterStageQueueRedrawEntry *entry) { - g_object_unref (entry->actor); - entry->actor = NULL; + if (entry == NULL) + return; + + if (entry->actor != NULL) + { + g_object_unref (entry->actor); + entry->actor = NULL; + } + if (entry->has_clip) { clutter_paint_volume_free (&entry->clip);