[clutter/clutter-1.16] stage: Ensure that we don't pick during destruction
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter/clutter-1.16] stage: Ensure that we don't pick during destruction
- Date: Wed, 12 Jun 2013 09:05:17 +0000 (UTC)
commit e1fe999db05b857b13c408187edcf440fe4e2d51
Author: Emmanuele Bassi <ebassi gnome org>
Date: Sun Jun 9 17:38:19 2013 +0100
stage: Ensure that we don't pick during destruction
When destroying a ClutterStage we should just skip picking operations,
to avoid calling into a state that is being torn down.
clutter/clutter-stage.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/clutter/clutter-stage.c b/clutter/clutter-stage.c
index 39514f5..e2698f7 100644
--- a/clutter/clutter-stage.c
+++ b/clutter/clutter-stage.c
@@ -633,6 +633,9 @@ _clutter_stage_do_paint (ClutterStage *stage,
float clip_poly[8];
cairo_rectangle_int_t geom;
+ if (priv->impl == NULL)
+ return;
+
_clutter_stage_window_get_geometry (priv->impl, &geom);
if (clip)
@@ -1463,9 +1466,15 @@ _clutter_stage_do_pick (ClutterStage *stage,
priv = stage->priv;
+ if (CLUTTER_ACTOR_IN_DESTRUCTION (stage))
+ return CLUTTER_ACTOR (stage);
+
if (G_UNLIKELY (clutter_pick_debug_flags & CLUTTER_DEBUG_NOP_PICKING))
return CLUTTER_ACTOR (stage);
+ if (G_UNLIKELY (priv->impl == NULL))
+ return CLUTTER_ACTOR (stage);
+
#ifdef CLUTTER_ENABLE_PROFILE
if (clutter_profile_flags & CLUTTER_PROFILE_PICKING_ONLY)
_clutter_profile_resume ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]