From 5b887587f37e9038701121155b57b7e129a54a8b Mon Sep 17 00:00:00 2001 From: Plagman Date: Mon, 2 Jul 2012 04:51:24 +0000 Subject: [PATCH] mdsprite: don't try to factor textures from fallback skins git-svn-id: https://svn.eduke32.com/eduke32@2800 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/build/src/mdsprite.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/polymer/eduke32/build/src/mdsprite.c b/polymer/eduke32/build/src/mdsprite.c index eb9811da2..add4ff554 100644 --- a/polymer/eduke32/build/src/mdsprite.c +++ b/polymer/eduke32/build/src/mdsprite.c @@ -822,15 +822,16 @@ int32_t mdloadskin(md2model_t *m, int32_t number, int32_t pal, int32_t surf) return *texidx; // possibly fetch an already loaded texture - for (i=0; iskinmap; skzero; skzero = skzero->next) - if (!Bstrcasecmp(skzero->fn, sk->fn) && skzero->texid[hicfxmask(pal)]) - { - int32_t f = hicfxmask(pal); + if (sk) + for (i=0; iskinmap; skzero; skzero = skzero->next) + if (!Bstrcasecmp(skzero->fn, sk->fn) && skzero->texid[hicfxmask(pal)]) + { + int32_t f = hicfxmask(pal); - sk->texid[f] = skzero->texid[f]; - return sk->texid[f]; - } + sk->texid[f] = skzero->texid[f]; + return sk->texid[f]; + } *texidx = 0;