From 524f4874a87c5ee03bf7b3fc8260788ce8131d07 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Sat, 9 Sep 2023 04:08:09 +0300 Subject: [PATCH] client: fix weird crash in spectator code during engine initialize --- cl_dll/hud_spectator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cl_dll/hud_spectator.cpp b/cl_dll/hud_spectator.cpp index 5bedd0a..53644cc 100644 --- a/cl_dll/hud_spectator.cpp +++ b/cl_dll/hud_spectator.cpp @@ -119,7 +119,7 @@ void CHudSpectator::SetSpectatorStartPosition() cl_entity_t * pEnt = gEngfuncs.GetEntityByIndex( 0 ); // get world model - if ( pEnt ) + if ( pEnt && pEnt->model && pEnt->model->entities ) { char *data; char keyname[256];