From d19f6feb45cfedfedda997967954ea892c4cfb92 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Mon, 11 May 2009 12:43:37 +0100 Subject: [PATCH] [stage] Chain up ::show before showing the implementation When showing a Stage for the first time we end up realizing the stage implementation before realizing the wrapper. This leads to segmentation faults or errors coming from the backend because we're fumbling the state and realization sequence. --- clutter/clutter-stage.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/clutter/clutter-stage.c b/clutter/clutter-stage.c index 3087dc260..22e891ad4 100644 --- a/clutter/clutter-stage.c +++ b/clutter/clutter-stage.c @@ -312,11 +312,11 @@ clutter_stage_show (ClutterActor *self) { ClutterStagePrivate *priv = CLUTTER_STAGE (self)->priv; + CLUTTER_ACTOR_CLASS (clutter_stage_parent_class)->show (self); + g_assert (priv->impl != NULL); clutter_actor_show (priv->impl); - - CLUTTER_ACTOR_CLASS (clutter_stage_parent_class)->show (self); } static void @@ -324,10 +324,10 @@ clutter_stage_hide (ClutterActor *self) { ClutterStagePrivate *priv = CLUTTER_STAGE (self)->priv; + CLUTTER_ACTOR_CLASS (clutter_stage_parent_class)->hide (self); + g_assert (priv->impl != NULL); clutter_actor_hide (priv->impl); - - CLUTTER_ACTOR_CLASS (clutter_stage_parent_class)->hide (self); } static void