Polymodes: Check that texture entries have a non-skybox filename before using it in texcache_fetchmulti.

Fixes crash reported by Sgt Jack V.

git-svn-id: https://svn.eduke32.com/eduke32@6220 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2017-06-22 01:32:05 +00:00
parent f03d704ddb
commit b25ec936b3

View file

@ -82,7 +82,7 @@ pthtyp *texcache_fetchmulti(pthtyp *pth, hicreplctyp *si, int32_t dapicnum, int3
for (pth2=texcache.list[i]; pth2; pth2=pth2->next)
{
if (pth2->hicr && pth2->hicr->filename && filnamcmp(pth2->hicr->filename, si->filename) == 0)
if (pth2->hicr && pth2->hicr->filename && si->filename && filnamcmp(pth2->hicr->filename, si->filename) == 0)
{
Bmemcpy(pth, pth2, sizeof(pthtyp));
pth->picnum = dapicnum;