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
This commit is contained in:
Emmanuele Bassi 2011-06-07 14:34:19 +01:00
parent 19c986c0c6
commit 22cc9b35cb

View File

@ -1053,13 +1053,13 @@ clutter_stage_do_redraw (ClutterStage *stage)
gboolean gboolean
_clutter_stage_do_update (ClutterStage *stage) _clutter_stage_do_update (ClutterStage *stage)
{ {
ClutterStagePrivate *priv; ClutterStagePrivate *priv = stage->priv;
g_return_val_if_fail (CLUTTER_IS_STAGE (stage), FALSE); /* if the stage is being destroyed, or if the destruction already
* happened and we don't have an StageWindow any more, then we
priv = stage->priv; * should bail out
*/
if (CLUTTER_ACTOR_IN_DESTRUCTION (stage)) if (CLUTTER_ACTOR_IN_DESTRUCTION (stage) || priv->impl == NULL)
return FALSE; return FALSE;
/* NB: We need to ensure we have an up to date layout *before* we /* NB: We need to ensure we have an up to date layout *before* we