From 34ad8a8be76fb110523cef17a123f91debb42088 Mon Sep 17 00:00:00 2001 From: nitrocaster Date: Mon, 14 Dec 2015 01:41:41 +0300 Subject: [PATCH] Fix null pointer dereference when running g_kill command in disconnected state. --- src/xrGame/console_commands_mp.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/xrGame/console_commands_mp.cpp b/src/xrGame/console_commands_mp.cpp index 31bccea6df8..84286557aeb 100644 --- a/src/xrGame/console_commands_mp.cpp +++ b/src/xrGame/console_commands_mp.cpp @@ -155,7 +155,8 @@ class CCC_Kill : public IConsole_Command { { if (IsGameTypeSingle()) return; - + if (!g_pGameLevel) + return; if (Game().local_player && Game().local_player->testFlag(GAME_PLAYER_FLAG_VERY_VERY_DEAD)) return;