add allocation failure case in R_DrawMasked

This commit is contained in:
Alug 2025-10-16 13:39:35 +02:00 committed by NepDisk
parent 71f14c1a0e
commit a06aa1590f

View file

@ -3857,6 +3857,9 @@ void R_DrawMasked(maskcount_t* masks, INT32 nummasks)
heads = static_cast<drawnode_t*>(calloc(nummasks, sizeof(drawnode_t)));
if (!heads)
I_Error("R_DrawMasked: No more free memory\n");
for (i = 0; i < nummasks; i++)
{
heads[i].next = heads[i].prev = &heads[i];