diff --git a/clutter/clutter-actor.c b/clutter/clutter-actor.c index cf1f3bb94..eb44d047c 100644 --- a/clutter/clutter-actor.c +++ b/clutter/clutter-actor.c @@ -7654,7 +7654,10 @@ invalidate_queue_redraw_entry (ClutterActor *self, ClutterActorPrivate *priv = self->priv; if (priv->queue_redraw_entry != NULL) - _clutter_stage_queue_redraw_entry_invalidate (priv->queue_redraw_entry); + { + _clutter_stage_queue_redraw_entry_invalidate (priv->queue_redraw_entry); + priv->queue_redraw_entry = NULL; + } return TRUE; } diff --git a/clutter/clutter-stage.c b/clutter/clutter-stage.c index 0d067c59e..1cb89ecb9 100644 --- a/clutter/clutter-stage.c +++ b/clutter/clutter-stage.c @@ -3217,7 +3217,8 @@ _clutter_stage_queue_actor_redraw (ClutterStage *stage, static void free_queue_redraw_entry (ClutterStageQueueRedrawEntry *entry) { - g_object_unref (entry->actor); + if (entry->actor) + g_object_unref (entry->actor); if (entry->has_clip) clutter_paint_volume_free (&entry->clip); g_slice_free (ClutterStageQueueRedrawEntry, entry); @@ -3267,12 +3268,13 @@ _clutter_stage_maybe_finish_queue_redraws (ClutterStage *stage) ClutterPaintVolume *clip; /* NB: Entries may be invalidated if the actor gets destroyed */ - if (G_UNLIKELY (entry->actor == NULL)) - continue; + if (G_LIKELY (entry->actor != NULL)) + { + clip = entry->has_clip ? &entry->clip : NULL; - clip = entry->has_clip ? &entry->clip : NULL; + _clutter_actor_finish_queue_redraw (entry->actor, clip); + } - _clutter_actor_finish_queue_redraw (entry->actor, clip); free_queue_redraw_entry (entry); } g_list_free (stolen_list);