From b3f5a6e2ba29852f1f4a4d9b0f9efcdae1a61af0 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Fri, 12 Nov 2010 18:09:25 +0000 Subject: [PATCH] actor: Do not queue relayouts on actors being destroyed Simple optimization is simple. --- clutter/clutter-actor.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/clutter/clutter-actor.c b/clutter/clutter-actor.c index d9af45ccd..243d79009 100644 --- a/clutter/clutter-actor.c +++ b/clutter/clutter-actor.c @@ -1865,7 +1865,7 @@ clutter_actor_real_queue_relayout (ClutterActor *self) N_CACHED_SIZE_REQUESTS * sizeof (SizeRequest)); /* We need to go all the way up the hierarchy */ - if (priv->parent_actor) + if (priv->parent_actor != NULL) _clutter_actor_queue_only_relayout (priv->parent_actor); } @@ -5188,11 +5188,10 @@ _clutter_actor_queue_redraw_with_clip (ClutterActor *self, static void _clutter_actor_queue_only_relayout (ClutterActor *self) { - ClutterActorPrivate *priv; + ClutterActorPrivate *priv = self->priv; - g_return_if_fail (CLUTTER_IS_ACTOR (self)); - - priv = self->priv; + if (CLUTTER_ACTOR_IN_DESTRUCTION (self)) + return; if (priv->needs_width_request && priv->needs_height_request &&