(!1967) 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
9b76094c53
commit
36d533f830
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->clipOrg.y = yOrigin;
|
||||||
pGC->stateChanges |= GCClipYOrigin;
|
pGC->stateChanges |= GCClipYOrigin;
|
||||||
|
|
||||||
if (size)
|
if (size && prectsNew)
|
||||||
memmove((char *) prectsNew, (char *) prects, size);
|
memmove((char *) prectsNew, (char *) prects, size);
|
||||||
(*pGC->funcs->ChangeClip) (pGC, newct, (void *) prectsNew, nrects);
|
(*pGC->funcs->ChangeClip) (pGC, newct, (void *) prectsNew, nrects);
|
||||||
if (pGC->funcs->ChangeGC)
|
if (pGC->funcs->ChangeGC)
|
||||||
|
|
Loading…
Reference in New Issue