From 42346aee87b805b141af268957294357754d4149 Mon Sep 17 00:00:00 2001 From: pierow Date: Tue, 12 Mar 2024 08:04:52 -0400 Subject: [PATCH] fix crash after getting kicked from a server --- main/source/cl_dll/ammo.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main/source/cl_dll/ammo.cpp b/main/source/cl_dll/ammo.cpp index 34cce258..92a2ee1a 100644 --- a/main/source/cl_dll/ammo.cpp +++ b/main/source/cl_dll/ammo.cpp @@ -445,7 +445,8 @@ void WeaponsResource::UserCmd_MovementOff() IN_Attack2Up(); IN_ReloadUp(); - if (gViewPort) + // Check if we're in game. + if (gEngfuncs.pfnGetLevelName()[0] != 0) { if (gHUD.GetHUDUser3() == AVH_USER3_ALIEN_PLAYER2) {