aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/lib
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11/lib')
-rw-r--r--nx-X11/lib/X11/Xregion.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/nx-X11/lib/X11/Xregion.h b/nx-X11/lib/X11/Xregion.h
index 1c36db144..4f55af82f 100644
--- a/nx-X11/lib/X11/Xregion.h
+++ b/nx-X11/lib/X11/Xregion.h
@@ -113,10 +113,11 @@ typedef struct _XRegion {
*/
#define MEMCHECK(reg, rect, firstrect){\
if ((reg)->numRects >= ((reg)->size - 1)){\
- (firstrect) = (BOX *) Xrealloc \
- ((char *)(firstrect), (unsigned) (2 * (sizeof(BOX)) * ((reg)->size)));\
- if ((firstrect) == 0)\
+ BoxPtr tmpRect = Xrealloc ((firstrect), \
+ (2 * (sizeof(BOX)) * ((reg)->size))); \
+ if (tmpRect == NULL) \
return(0);\
+ (firstrect) = tmpRect; \
(reg)->size *= 2;\
(rect) = &(firstrect)[(reg)->numRects];\
}\