don't try to write non-existant textures

This commit is contained in:
Bill Currie 2004-05-11 07:26:33 +00:00
parent 3e16e3dc40
commit f10f59bb42

View file

@ -361,6 +361,8 @@ extract_textures (void)
sizeof (default_palette)); sizeof (default_palette));
for (i = 0; i < miptexlump->nummiptex; i++) { for (i = 0; i < miptexlump->nummiptex; i++) {
if (miptexlump->dataofs[i] == -1)
continue;
miptex = (miptex_t *)(bsp->texdata + miptexlump->dataofs[i]); miptex = (miptex_t *)(bsp->texdata + miptexlump->dataofs[i]);
pixels = miptex->width * miptex->height / 64 * 85; pixels = miptex->width * miptex->height / 64 * 85;
mtsize = sizeof (miptex_t) + pixels; mtsize = sizeof (miptex_t) + pixels;