Polymer: fix possible NULL pointer dereference in polymer_getbuildmaterial().

git-svn-id: https://svn.eduke32.com/eduke32@3799 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2013-05-22 16:23:14 +00:00
parent d966ed7de1
commit 43520eba5b

View file

@ -4561,12 +4561,14 @@ static void polymer_getbuildmaterial(_prmaterial* material, int16_t tile
pth = texcache_fetch(tilenum, pal, 0, cmeth);
if (pth)
{
material->diffusemap = pth->glpic;
if (pth->hicr)
{
material->diffusescale[0] = pth->hicr->xscale;
material->diffusescale[1] = pth->hicr->yscale;
if (pth->hicr)
{
material->diffusescale[0] = pth->hicr->xscale;
material->diffusescale[1] = pth->hicr->yscale;
}
}
// Lazily fill in all the textures we need, move this to precaching later