From 0d843526f098ef8c5d80d7b1b7aaee78251eb77c Mon Sep 17 00:00:00 2001 From: terminx Date: Sun, 7 Oct 2018 05:21:39 +0000 Subject: [PATCH] Fix null pointer deference when attempting to load a model with improper or missing skin definitions git-svn-id: https://svn.eduke32.com/eduke32@7019 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/build/src/mdsprite.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/build/src/mdsprite.cpp b/source/build/src/mdsprite.cpp index ad9e6629a..da0dd342c 100644 --- a/source/build/src/mdsprite.cpp +++ b/source/build/src/mdsprite.cpp @@ -677,7 +677,7 @@ int32_t mdloadskin(md2model_t *m, int32_t number, int32_t pal, int32_t surf) if (pal >= (MAXPALOOKUPS - RESERVEDPALS)) for (i=0; iskinmap; skzero; skzero = skzero->next) - if (!Bstrcasecmp(skzero->fn, sk->fn) && skzero->texid[hicfxid(pal)]) + if (!Bstrcasecmp(skzero->fn, sk->fn) && skzero->texid[hicfxid(pal)] && sk) { size_t f = hicfxid(pal);