From 60bd3121fb37fc12c266bdf2e10bb22f1375d90a Mon Sep 17 00:00:00 2001 From: Andrey Akhmichin <15944199+nekonomicon@users.noreply.github.com> Date: Tue, 8 Nov 2022 23:25:27 +0500 Subject: [PATCH] Prevent possible null pointer dereference. --- dlls/client.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/client.cpp b/dlls/client.cpp index 2ca1de59..32740dc5 100644 --- a/dlls/client.cpp +++ b/dlls/client.cpp @@ -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 );