Skip to content

Commit

Permalink
Fix rare crash
Browse files Browse the repository at this point in the history
  • Loading branch information
Vauff committed Oct 19, 2024
1 parent 58a3c49 commit 5b81f54
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/cs2fixes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -933,9 +933,13 @@ void CS2Fixes::Hook_CheckMovingGround(double frametime)
{
CCSPlayer_MovementServices *pMove = META_IFACEPTR(CCSPlayer_MovementServices);
CCSPlayerPawn *pPawn = pMove->GetPawn();

if (!pPawn)
RETURN_META(MRES_IGNORED);

CCSPlayerController *pController = pPawn->GetOriginalController();

if (!pPawn || !pController)
if (!pController)
RETURN_META(MRES_IGNORED);

int iSlot = pController->GetPlayerSlot();
Expand Down

0 comments on commit 5b81f54

Please sign in to comment.