glx: Do not access stage_clip without checking it
The stage_clip parameter for add_redraw_clip() can be NULL, so we need to check before accessing its members.
This commit is contained in:
parent
913c187f4e
commit
a39cef41b8
@ -377,14 +377,15 @@ clutter_stage_glx_add_redraw_clip (ClutterStageWindow *stage_window,
|
||||
if (clutter_stage_glx_ignoring_redraw_clips (stage_window))
|
||||
return;
|
||||
|
||||
/* Do nothing on an empty clip, to avoid confusing with the flag degenerate clip */
|
||||
if (stage_clip->width == 0)
|
||||
/* Do nothing on an empty clip, to avoid confusing with the flag degenerate
|
||||
* clip */
|
||||
if (stage_clip != NULL && stage_clip->width == 0)
|
||||
return;
|
||||
|
||||
/* A NULL stage clip means a full stage redraw has been queued and
|
||||
* we keep track of this by setting a degenerate
|
||||
* stage_glx->bounding_redraw_clip */
|
||||
if (!stage_clip)
|
||||
if (stage_clip == NULL)
|
||||
{
|
||||
stage_glx->bounding_redraw_clip.width = 0;
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user