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:
parent
9d13313511
commit
3178018b84
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)
|
||||
|
|
Loading…
Reference in New Issue