# HG changeset patch # User Adam Kaminski # Date 1638488550 18000 # Thu Dec 02 18:42:30 2021 -0500 # Node ID 9a4d26b326572a44065e34122366524ad9be73c2 # Parent 33f7f8b86568e48eb015e5d4995e36830dfa3dcb Added a sanity check to ensure that a team's carrier is still a valid player. diff -r 33f7f8b86568 -r 9a4d26b32657 src/team.cpp --- a/src/team.cpp Sun Nov 28 14:28:02 2021 -0500 +++ b/src/team.cpp Thu Dec 02 18:42:30 2021 -0500 @@ -1243,7 +1243,8 @@ // player_t *TEAM_GetCarrier( ULONG ulTeamIdx ) { - if ( TEAM_CheckIfValid( ulTeamIdx )) + // [AK] Also make sure that this team's carrier is still valid. + if (( TEAM_CheckIfValid( ulTeamIdx )) && ( PLAYER_IsValidPlayerWithMo( teams[ulTeamIdx].g_pCarrier - players ))) return ( teams[ulTeamIdx].g_pCarrier ); return ( NULL );