AM_MinimapGenerate: return NULL if malloc fails

This commit is contained in:
toaster 2023-01-23 19:18:19 +00:00 committed by GenericHeroGuy
parent 5cd0f14345
commit 281265f777

View file

@ -1406,6 +1406,9 @@ minigen_t *AM_MinimapGenerate(INT32 wh)
ret.h = f_h;
am_buf = ret.buf = malloc((f_w*f_h));
if (ret.buf == NULL)
return NULL;
//AM_clearFB(BACKGROUND);
memset(am_buf, 0xff, (f_w*f_h));
AM_drawWalls(PASS_FOF);