From 92cfa2af48c8f38d1110814aa7f2c8d5d16e7b0c Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Thu, 7 Apr 2022 22:02:31 +0300 Subject: [PATCH] ref_soft: light: fixed game crash in Customize multiplayer menu --- ref_soft/r_light.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ref_soft/r_light.c b/ref_soft/r_light.c index 8ca462de..1e84d77d 100644 --- a/ref_soft/r_light.c +++ b/ref_soft/r_light.c @@ -156,7 +156,8 @@ void R_PushDlights( void ) tr.dlightframecount = tr.framecount; RI.currententity = gEngfuncs.GetEntityByIndex( 0 ); - RI.currentmodel = RI.currententity->model; + if( RI.currententity ) + RI.currentmodel = RI.currententity->model; for( i = 0; i < MAX_DLIGHTS; i++, l++ ) { @@ -168,7 +169,8 @@ void R_PushDlights( void ) //if( GL_FrustumCullSphere( &RI.frustum, l->origin, l->radius, 15 )) //continue; - R_MarkLights( l, 1<nodes ); + if( RI.currententity ) + R_MarkLights( l, 1<nodes ); } }