don't segfault when there are holes in the texture list

This commit is contained in:
Bill Currie 2007-05-16 09:23:54 +00:00 committed by Jeff Teunissen
parent 85c5594148
commit 866eaa22f6
1 changed files with 1 additions and 1 deletions

View File

@ -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;