mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
r9402: Fixed nullptr dereference & assertion error
https://github.com/1dot13/source/issues/3#issue-1400794531 https://github.com/1dot13/source/issues/2#issue-1400794162
This commit is contained in:
@@ -4937,9 +4937,8 @@ BOOLEAN OKForSectorExit( INT8 bExitDirection, INT32 usAdditionalData, UINT32 *pu
|
||||
for ( pSoldier = MercPtrs[cnt]; cnt <= gTacticalStatus.Team[gbPlayerNum].bLastID; ++cnt, ++pSoldier )
|
||||
{
|
||||
// If we are controllable
|
||||
//if ( OK_CONTROLLABLE_MERC( pSoldier) && pSoldier->bAssignment == CurrentSquad( ) )
|
||||
if ( OK_CONTROLLABLE_MERC( pSoldier ) && (pSoldier->bAssignment == CurrentSquad( ) ||
|
||||
(pSoldier->bAssignment == VEHICLE && GetSoldierStructureForVehicle( pSoldier->iVehicleId )->bAssignment == CurrentSquad( ))) )
|
||||
(pSoldier->bAssignment == VEHICLE && pSoldier->iVehicleId != iHelicopterVehicleId && GetSoldierStructureForVehicle( pSoldier->iVehicleId )->bAssignment == CurrentSquad( ))) )
|
||||
{
|
||||
//Need to keep a copy of a good soldier, so we can access it later, and
|
||||
//not more than once.
|
||||
|
||||
Reference in New Issue
Block a user