Report CGDMalloc failures

This commit is contained in:
Lephenixnoir 2021-08-04 09:55:36 +02:00
parent 58e007be85
commit 3e79691ad1
Signed by: Lephenixnoir
GPG Key ID: 1BBA026E13FC0495
1 changed files with 4 additions and 1 deletions

View File

@ -12,7 +12,10 @@ void * CGDMalloc(int iSize)
iAllocSum += iSize;
printf("malloc %i (%i)\n",iSize,iAllocSum);
#endif
return malloc(iSize);
void *p = malloc(iSize);
if (!p)
I_Error ("CGDMalloc failure");
return p;
}
void * CGDCalloc(int iSize)