any of those may be NULL in MakePatch

no idea but this crap keeps crashing in some other place every single time i add a check somewhere else
This commit is contained in:
Alug committed 2025-01-05 23:02:36 +01:00
1 parent e796f7e81f
commit 7177b396e0
1 file changed
+10
+10
View File
@@ -410,6 +410,16 @@ static void HWR_GenerateTexture(INT32 texnum, GLMapTexture_t *gltex, boolean noe
// patch may be NULL if glMipmap has been initialised already and makebitmap is false
void HWR_MakePatch (patch_t *patch, GLPatch_t *glPatch, GLMipmap_t *glMipmap, boolean makebitmap)
{
if (glMipmap == NULL)
return;
if (patch == NULL || glPatch == NULL)
{
Z_Free(glMipmap->data);
glMipmap->data = NULL;
return;
}
// don't do it twice (like a cache)
if (glMipmap->width == 0)
{