Prevent possible null pointer dereference.

This commit is contained in:
Andrey Akhmichin 2022-11-08 23:25:27 +05:00
parent 06521e8950
commit 60bd3121fb
No known key found for this signature in database
GPG Key ID: 1F180D249B0643C0
1 changed files with 1 additions and 1 deletions

View File

@ -817,7 +817,7 @@ void StartFrame( void )
g_ulFrameCount++;
int oldBhopcap = g_bhopcap;
g_bhopcap = ( g_pGameRules->IsMultiplayer() && bhopcap.value != 0.0f ) ? 1 : 0;
g_bhopcap = ( g_pGameRules && g_pGameRules->IsMultiplayer() && bhopcap.value != 0.0f ) ? 1 : 0;
if( g_bhopcap != oldBhopcap )
{
MESSAGE_BEGIN( MSG_ALL, gmsgBhopcap, NULL );