From 9f83e7dc2ee855dbbb8cb7de8b7a42d43dd485b0 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Tue, 16 Jun 2009 16:38:01 +0100 Subject: [PATCH] [stage] Remove an assertion We might get a size request on destruction, so it should be safe to avoid an assertion failure because we don't have the stage implementation anymore. --- clutter/clutter-stage.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/clutter/clutter-stage.c b/clutter/clutter-stage.c index f457cd2af..dab695189 100644 --- a/clutter/clutter-stage.c +++ b/clutter/clutter-stage.c @@ -134,7 +134,8 @@ clutter_stage_get_preferred_width (ClutterActor *self, { ClutterStagePrivate *priv = CLUTTER_STAGE (self)->priv; - g_assert (priv->impl != NULL); + if (priv->impl == NULL) + return; CLUTTER_ACTOR_GET_CLASS (priv->impl)->get_preferred_width (priv->impl, for_height, @@ -150,7 +151,8 @@ clutter_stage_get_preferred_height (ClutterActor *self, { ClutterStagePrivate *priv = CLUTTER_STAGE (self)->priv; - g_assert (priv->impl != NULL); + if (priv->impl == NULL) + return; CLUTTER_ACTOR_GET_CLASS (priv->impl)->get_preferred_height (priv->impl, for_width, @@ -167,7 +169,8 @@ clutter_stage_allocate (ClutterActor *self, origin_changed = (flags & CLUTTER_ABSOLUTE_ORIGIN_CHANGED) ? TRUE : FALSE; - g_assert (priv->impl != NULL); + if (priv->impl == NULL) + return; /* if the stage is fixed size (for instance, it's using a frame-buffer) * then we simply ignore any allocation request and override the