Skip to content

Commit

Permalink
Fix crash with @aim targeting
Browse files Browse the repository at this point in the history
  • Loading branch information
Vauff committed Dec 14, 2024
1 parent 11094ed commit 66feb3f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/playermanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1305,7 +1305,7 @@ ETargetError CPlayerManager::GetPlayersFromString(CCSPlayerController* pPlayer,
CBaseEntity* entTarget = nullptr;
entTarget = UTIL_FindPickerEntity(pPlayer);

if (!entTarget->IsPawn())
if (!entTarget || !entTarget->IsPawn())
return ETargetError::INVALID;

CCSPlayerController* pTarget = CCSPlayerController::FromPawn(static_cast<CCSPlayerPawn*>(entTarget));
Expand Down

0 comments on commit 66feb3f

Please sign in to comment.