Index: region.c =================================================================== --- region.c (revision 54135) +++ region.c (working copy) @@ -2916,9 +2916,15 @@ numRects = ((numFullPtBlocks * NUMPTSTOBUFFER) + iCurPtBlock) >> 1; + if(numRects == 0) + { + reg->rdh.nCount = 0; + RtlZeroMemory(®->rdh.rcBound, sizeof(RECTL)); + } + if (!(temp = ExAllocatePoolWithTag(PagedPool, numRects * sizeof(RECT), TAG_REGION))) { - return 0; + return FALSE; } if (reg->Buffer != NULL) { @@ -2980,7 +2986,7 @@ } reg->rdh.nCount = numRects; - return(TRUE); + return TRUE; } /***********************************************************************