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:
Enrico Weigelt, metux IT consult 2025-05-07 12:55:40 +02:00
parent 9d13313511
commit 3178018b84

View File

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