add guard to vid.screens free
not super necessary but better safe than sorry
This commit is contained in:
1 parent
39269648a9
commit
a60d897eb8
2 files changed
+6
-3
No files matched your search
@@ -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
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user