mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-11 07:11:39 +00:00
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:
parent
d966ed7de1
commit
43520eba5b
1 changed files with 6 additions and 4 deletions
|
@ -4561,6 +4561,7 @@ 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)
|
||||
|
@ -4568,6 +4569,7 @@ static void polymer_getbuildmaterial(_prmaterial* material, int16_t tile
|
|||
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
|
||||
if (pr_artmapping && (!pth || !pth->hicr) && tilenum != (MAXTILES - 4)) {
|
||||
|
|
Loading…
Reference in a new issue