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.
This commit is contained in:
parent
d343cc6289
commit
e1fe999db0
@ -633,6 +633,9 @@ _clutter_stage_do_paint (ClutterStage *stage,
|
|||||||
float clip_poly[8];
|
float clip_poly[8];
|
||||||
cairo_rectangle_int_t geom;
|
cairo_rectangle_int_t geom;
|
||||||
|
|
||||||
|
if (priv->impl == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
_clutter_stage_window_get_geometry (priv->impl, &geom);
|
_clutter_stage_window_get_geometry (priv->impl, &geom);
|
||||||
|
|
||||||
if (clip)
|
if (clip)
|
||||||
@ -1463,9 +1466,15 @@ _clutter_stage_do_pick (ClutterStage *stage,
|
|||||||
|
|
||||||
priv = stage->priv;
|
priv = stage->priv;
|
||||||
|
|
||||||
|
if (CLUTTER_ACTOR_IN_DESTRUCTION (stage))
|
||||||
|
return CLUTTER_ACTOR (stage);
|
||||||
|
|
||||||
if (G_UNLIKELY (clutter_pick_debug_flags & CLUTTER_DEBUG_NOP_PICKING))
|
if (G_UNLIKELY (clutter_pick_debug_flags & CLUTTER_DEBUG_NOP_PICKING))
|
||||||
return CLUTTER_ACTOR (stage);
|
return CLUTTER_ACTOR (stage);
|
||||||
|
|
||||||
|
if (G_UNLIKELY (priv->impl == NULL))
|
||||||
|
return CLUTTER_ACTOR (stage);
|
||||||
|
|
||||||
#ifdef CLUTTER_ENABLE_PROFILE
|
#ifdef CLUTTER_ENABLE_PROFILE
|
||||||
if (clutter_profile_flags & CLUTTER_PROFILE_PICKING_ONLY)
|
if (clutter_profile_flags & CLUTTER_PROFILE_PICKING_ONLY)
|
||||||
_clutter_profile_resume ();
|
_clutter_profile_resume ();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user