mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-02-09 01:01:07 +00:00
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:
parent
58ea3adeeb
commit
789fbdd5de
1 changed files with 6 additions and 0 deletions
|
@ -496,6 +496,12 @@ static void Mod_LoadTextures (lump_t *l)
|
||||||
for (j=0 ; j<MIPLEVELS ; j++)
|
for (j=0 ; j<MIPLEVELS ; j++)
|
||||||
mt->offsets[j] = LittleLong (mt->offsets[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 ( (mt->width & 15) || (mt->height & 15) )
|
||||||
{
|
{
|
||||||
if (loadmodel->bspversion != BSPVERSION_QUAKE64)
|
if (loadmodel->bspversion != BSPVERSION_QUAKE64)
|
||||||
|
|
Loading…
Reference in a new issue