From b25ec936b326b2d2e5a52f23bac27d314bb5bda7 Mon Sep 17 00:00:00 2001 From: hendricks266 Date: Thu, 22 Jun 2017 01:32:05 +0000 Subject: [PATCH] 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 --- source/build/src/texcache.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/build/src/texcache.cpp b/source/build/src/texcache.cpp index b25aa93b8..36794d14b 100644 --- a/source/build/src/texcache.cpp +++ b/source/build/src/texcache.cpp @@ -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;