diff options
author | Emmanuele Bassi <ebassi@linux.intel.com> | 2011-06-07 14:34:19 +0100 |
---|---|---|
committer | Emmanuele Bassi <ebassi@linux.intel.com> | 2011-06-08 13:07:36 +0100 |
commit | 0513e0243aa393c66adf8976be66ef55dbbbb82e (patch) | |
tree | 93f96200ba728487bfc1c6dabec962e220573f10 | |
parent | 142b1e988d269bd674f3b7c7d2f00657c1b17fdf (diff) | |
download | clutter-0513e0243aa393c66adf8976be66ef55dbbbb82e.tar.gz |
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
(cherry picked from commit 22cc9b35cb78e9b7a867a3c356647e15bf005c85)
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
-rw-r--r-- | clutter/clutter-stage.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/clutter/clutter-stage.c b/clutter/clutter-stage.c index 320b29d2c..de31aefdb 100644 --- a/clutter/clutter-stage.c +++ b/clutter/clutter-stage.c @@ -863,13 +863,13 @@ clutter_stage_do_redraw (ClutterStage *stage) gboolean _clutter_stage_do_update (ClutterStage *stage) { - ClutterStagePrivate *priv; - - g_return_val_if_fail (CLUTTER_IS_STAGE (stage), FALSE); - - priv = stage->priv; + ClutterStagePrivate *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 |