Skip to content

Commit 515decd

Browse files
committed
Fix crash due to MST_FLARE usage
1 parent 6c3e60f commit 515decd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/engine/renderer/tr_bsp.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3440,6 +3440,12 @@ static void R_LoadSurfaces( lump_t *surfs, lump_t *verts, lump_t *indexLump )
34403440
case mapSurfaceType_t::MST_FLARE:
34413441
Log::Warn( "Surface type not supported: MST_FLARE; firstIndex: %i, numIndexes: %i, shaderNum: %i",
34423442
in->firstIndex, in->numIndexes, in->shaderNum );
3443+
3444+
// We still have to set these because other code will be checking them
3445+
out->data = ( surfaceType_t* ) ri.Hunk_Alloc( sizeof( surfaceType_t ), ha_pref::h_low );
3446+
*out->data = surfaceType_t::SF_BAD;
3447+
out->shader = tr.defaultShader;
3448+
34433449
numFlares++;
34443450
break;
34453451

0 commit comments

Comments
 (0)