From 22cc9b35cb78e9b7a867a3c356647e15bf005c85 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Tue, 7 Jun 2011 14:34:19 +0100 Subject: [PATCH] stage: Bail out of do_update() when no impl is set If the Stage has been destroyed the StageWindow implementation is not going to be available, but the IN_DESTRUCTION flag will have already been cleared. http://bugzilla.clutter-project.org/show_bug.cgi?id=2656 --- clutter/clutter-stage.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/clutter/clutter-stage.c b/clutter/clutter-stage.c index a6aeea1d0..65ff8759d 100644 --- a/clutter/clutter-stage.c +++ b/clutter/clutter-stage.c @@ -1053,13 +1053,13 @@ clutter_stage_do_redraw (ClutterStage *stage) gboolean _clutter_stage_do_update (ClutterStage *stage) { - ClutterStagePrivate *priv; + ClutterStagePrivate *priv = stage->priv; - g_return_val_if_fail (CLUTTER_IS_STAGE (stage), FALSE); - - priv = stage->priv; - - if (CLUTTER_ACTOR_IN_DESTRUCTION (stage)) + /* if the stage is being destroyed, or if the destruction already + * happened and we don't have an StageWindow any more, then we + * should bail out + */ + if (CLUTTER_ACTOR_IN_DESTRUCTION (stage) || priv->impl == NULL) return FALSE; /* NB: We need to ensure we have an up to date layout *before* we