mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-02-17 01:31:25 +00:00
Fix hw_vertexbuilder lightmap nullptr error
This commit is contained in:
parent
dae78e2a2c
commit
3e96e9010e
1 changed files with 1 additions and 1 deletions
|
@ -240,7 +240,7 @@ static int CreateIndexedSectorVerticesLM(FRenderState& renderstate, sector_t* se
|
||||||
{
|
{
|
||||||
subsector_t* sub = sec->subsectors[i];
|
subsector_t* sub = sec->subsectors[i];
|
||||||
DoomLevelMeshSurface* lightmap = sub->lightmap[h][lightmapIndex];
|
DoomLevelMeshSurface* lightmap = sub->lightmap[h][lightmapIndex];
|
||||||
if (lightmap->Type != ST_UNKNOWN)
|
if (lightmap && lightmap->Type != ST_UNKNOWN) // lightmap may be missing if the subsector is degenerate triangle
|
||||||
{
|
{
|
||||||
float* luvs = lightmap->TexCoords;
|
float* luvs = lightmap->TexCoords;
|
||||||
int lindex = lightmap->LightmapNum;
|
int lindex = lightmap->LightmapNum;
|
||||||
|
|
Loading…
Reference in a new issue