mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-27 12:19:10 +00:00
dix: extra NULL safety check in SetClipRects()
Even though it might never be actually hit, it's better to have an (really cheap) extra check, just in case. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
2
dix/gc.c
2
dix/gc.c
@@ -1022,7 +1022,7 @@ SetClipRects(GCPtr pGC, int xOrigin, int yOrigin, int nrects,
|
||||
pGC->clipOrg.y = yOrigin;
|
||||
pGC->stateChanges |= GCClipYOrigin;
|
||||
|
||||
if (size)
|
||||
if (size && prectsNew)
|
||||
memmove((char *) prectsNew, (char *) prects, size);
|
||||
(*pGC->funcs->ChangeClip) (pGC, newct, (void *) prectsNew, nrects);
|
||||
if (pGC->funcs->ChangeGC)
|
||||
|
||||
Reference in New Issue
Block a user