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.
This commit is contained in:
Robert Bragg 2010-09-23 16:03:06 +01:00
parent 37d0dbe6b2
commit f66e1de0e3

View File

@ -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