[clutter] stage: Bail out of do_update() when no impl is set



commit 22cc9b35cb78e9b7a867a3c356647e15bf005c85
Author: Emmanuele Bassi <ebassi linux intel com>
Date:   Tue Jun 7 14:34:19 2011 +0100

    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 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/clutter/clutter-stage.c b/clutter/clutter-stage.c
index a6aeea1..65ff875 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;
-
-  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



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]