Defend against empty textures.

E.g. __TB_empty in qbj_grue.bsp
See https://github.com/Novum/vkQuake/issues/567
This commit is contained in:
temx 2022-10-01 23:01:02 +03:00 committed by Ozkan Sezer
parent 58ea3adeeb
commit 789fbdd5de

View file

@ -496,6 +496,12 @@ static void Mod_LoadTextures (lump_t *l)
for (j=0 ; j<MIPLEVELS ; j++)
mt->offsets[j] = LittleLong (mt->offsets[j]);
if (mt->width == 0 || mt->height == 0)
{
Con_Warning ("Zero sized texture %s in %s!\n", mt->name, loadmodel->name);
continue;
}
if ( (mt->width & 15) || (mt->height & 15) )
{
if (loadmodel->bspversion != BSPVERSION_QUAKE64)