From acd8f8657013de63ca45294ded48ec531bc7fd64 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Mon, 15 Sep 2014 16:43:30 +0100 Subject: [PATCH] actor: Default paint volume does not work without allocation We already check for needs_allocation before getting the default paint volume, but explicit is better than implicit. --- clutter/clutter-actor.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/clutter/clutter-actor.c b/clutter/clutter-actor.c index d29d03697..c6813dd5f 100644 --- a/clutter/clutter-actor.c +++ b/clutter/clutter-actor.c @@ -5969,6 +5969,12 @@ clutter_actor_update_default_paint_volume (ClutterActor *self, ClutterActorPrivate *priv = self->priv; gboolean res = TRUE; + /* this should be checked before we call this function, but it's a + * good idea to be explicit when it costs us nothing + */ + if (priv->needs_allocation) + return FALSE; + /* we start from the allocation */ clutter_paint_volume_set_width (volume, priv->allocation.x2 - priv->allocation.x1);