aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/lib/X11
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11/lib/X11')
-rw-r--r--nx-X11/lib/X11/Region.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/nx-X11/lib/X11/Region.c b/nx-X11/lib/X11/Region.c
index 77e3aed76..3c4263760 100644
--- a/nx-X11/lib/X11/Region.c
+++ b/nx-X11/lib/X11/Region.c
@@ -980,11 +980,12 @@ miRegionOp(
if (REGION_NOT_EMPTY(newReg))
{
BoxPtr prev_rects = newReg->rects;
- newReg->size = newReg->numRects;
newReg->rects = Xrealloc (newReg->rects,
- sizeof(BoxRec) * newReg->size);
+ sizeof(BoxRec) * newReg->numRects);
if (! newReg->rects)
newReg->rects = prev_rects;
+ else
+ newReg->size = newReg->numRects;
}
else
{