add guard to vid.screens free

not super necessary but better safe than sorry
This commit is contained in:
Alug committed 2025-10-18 21:26:23 +02:00
1 parent 39269648a9
commit a60d897eb8
2 files changed
+6 -3

No files matched your search

-1
View File
@@ -31,7 +31,6 @@ FUNCINLINE static ATTRINLINE UINT8 *R_Address(INT32 px, INT32 py)
return vid.screens[0] + (py + viewwindowy) * vid.width + (viewwindowx + px);
}
typedef struct {
float x, y, z;
} floatv3_t;
+6 -2
View File
@@ -3832,11 +3832,15 @@ void V_Init(void)
for (i = 0; i < NUMSCREENS; i++)
{
if (vid.screens[i])
{
#if defined(__SSE__)
aligned_free(vid.screens[i]);
aligned_free(vid.screens[i]);
#else
free(vid.screens[i]);
free(vid.screens[i]);
#endif
}
vid.screens[i] = NULL;
}