From f66e1de0e35f7e310db919926bbc06d8b03becbf Mon Sep 17 00:00:00 2001 From: Robert Bragg Date: Thu, 23 Sep 2010 16:03:06 +0100 Subject: [PATCH] actor: don't pass NULL to _stage_set_pick_buffer_valid This adds a check in clutter_actor_real_queue_redraw after calling _clutter_actor_get_stage_internal to check in case the actor doesn't yet have an associated stage so we can avoid passing a NULL stage pointer to _clutter_stage_set_pick_buffer_valid which could cause a crash. --- clutter/clutter-actor.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/clutter/clutter-actor.c b/clutter/clutter-actor.c index fb7baeca5..2466351d7 100644 --- a/clutter/clutter-actor.c +++ b/clutter/clutter-actor.c @@ -1802,7 +1802,8 @@ clutter_actor_real_queue_redraw (ClutterActor *self, * invalidate the pick buffer in _clutter_stage_queue_actor_redraw */ stage = _clutter_actor_get_stage_internal (self); - _clutter_stage_set_pick_buffer_valid (CLUTTER_STAGE (stage), FALSE); + if (stage != NULL) + _clutter_stage_set_pick_buffer_valid (CLUTTER_STAGE (stage), FALSE); /* Although we could determine here that a full stage redraw * has already been queued and immediately bail out, we actually