mirror of
https://github.com/brl/mutter.git
synced 2025-02-02 14:53:03 +00:00
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))
|
if (clutter_stage_glx_ignoring_redraw_clips (stage_window))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* Do nothing on an empty clip, to avoid confusing with the flag degenerate clip */
|
/* Do nothing on an empty clip, to avoid confusing with the flag degenerate
|
||||||
if (stage_clip->width == 0)
|
* clip */
|
||||||
|
if (stage_clip != NULL && stage_clip->width == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* A NULL stage clip means a full stage redraw has been queued and
|
/* A NULL stage clip means a full stage redraw has been queued and
|
||||||
* we keep track of this by setting a degenerate
|
* we keep track of this by setting a degenerate
|
||||||
* stage_glx->bounding_redraw_clip */
|
* stage_glx->bounding_redraw_clip */
|
||||||
if (!stage_clip)
|
if (stage_clip == NULL)
|
||||||
{
|
{
|
||||||
stage_glx->bounding_redraw_clip.width = 0;
|
stage_glx->bounding_redraw_clip.width = 0;
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user