From f2d0f0ab5f120c514b82d75478aea1e17ad51ba7 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Tue, 20 Jul 2010 14:39:43 +0100 Subject: [PATCH] stage: Ignore redraws on destroyed stages We might get requests to redraw even during destruction; we should ignore them and do some NULL checks instead of blindly invoking functions. --- clutter/clutter-stage.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/clutter/clutter-stage.c b/clutter/clutter-stage.c index 34f06c661..41ef2fae0 100644 --- a/clutter/clutter-stage.c +++ b/clutter/clutter-stage.c @@ -771,6 +771,13 @@ gboolean _clutter_stage_has_full_redraw_queued (ClutterStage *stage) { ClutterStageWindow *stage_window = _clutter_stage_get_window (stage); + gboolean in_destruction; + + in_destruction = + ((CLUTTER_PRIVATE_FLAGS (stage) & CLUTTER_ACTOR_IN_DESTRUCTION) != FALSE); + + if (in_destruction || stage_window == NULL) + return FALSE; if (stage->priv->redraw_pending && !_clutter_stage_window_has_redraw_clips (stage_window))