summaryrefslogtreecommitdiff
path: root/amiga
diff options
context:
space:
mode:
Diffstat (limited to 'amiga')
-rwxr-xr-xamiga/gui.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/amiga/gui.c b/amiga/gui.c
index 3ba3d8957..249f80c89 100755
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -3754,5 +3754,10 @@ uint32 ami_popup_hook(struct Hook *hook,Object *item,APTR reserved)
static void *myrealloc(void *ptr, size_t len, void *pw)
{
+ if (len == 0) {
+ free(ptr);
+ return NULL;
+ }
+
return realloc(ptr, len);
}