don't segfault when there are holes in the texture list
This commit is contained in:
parent
85c5594148
commit
866eaa22f6
|
@ -142,7 +142,7 @@ mod_unique_miptex_name (texture_t **textures, texture_t *tx, int ind)
|
|||
name[16] = 0;
|
||||
do {
|
||||
for (i = 0; i < ind; i++)
|
||||
if (!strcmp (textures[i]->name, tx->name))
|
||||
if (textures[i] && !strcmp (textures[i]->name, tx->name))
|
||||
break;
|
||||
if (i == ind)
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue