mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-26 22:11:43 +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];
|
||||
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;
|
||||
int lindex = lightmap->LightmapNum;
|
||||
|
|
Loading…
Reference in a new issue