add allocation failure case in R_DrawMasked

This commit is contained in:
Alug committed 2025-10-16 14:00:51 +02:00
1 parent 2b39d137b4
commit 66ce745e91
1 file changed
+3
+3
View File
@@ -3064,6 +3064,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];