diff --git a/clutter/clutter-stage.c b/clutter/clutter-stage.c index 39514f56e..e2698f744 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 ();