Skip to content

Commit 34ad8a8

Browse files
author
nitrocaster
committed
Fix null pointer dereference when running g_kill command in disconnected state.
1 parent f5fa7eb commit 34ad8a8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/xrGame/console_commands_mp.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,8 @@ class CCC_Kill : public IConsole_Command {
155155
{
156156
if (IsGameTypeSingle())
157157
return;
158-
158+
if (!g_pGameLevel)
159+
return;
159160
if (Game().local_player &&
160161
Game().local_player->testFlag(GAME_PLAYER_FLAG_VERY_VERY_DEAD))
161162
return;

0 commit comments

Comments
 (0)