mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
Fixed nullptr dereference in void CommonEnterCombatModeCode( ) & added two nullptr safety checks
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9393 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -6428,7 +6428,7 @@ void CommonEnterCombatModeCode( )
|
||||
// Loop through all mercs and make go
|
||||
for ( pSoldier = Menptr, cnt = 0; cnt < TOTAL_SOLDIERS; pSoldier++, ++cnt )
|
||||
{
|
||||
if ( pSoldier->bActive )
|
||||
if ( pSoldier && pSoldier->bActive )
|
||||
{
|
||||
if ( pSoldier->bInSector && pSoldier->ubBodyType != CROW )
|
||||
{
|
||||
@@ -6440,7 +6440,7 @@ void CommonEnterCombatModeCode( )
|
||||
pSoldier->EVENT_StopMerc( pSoldier->sGridNo, pSoldier->ubDirection );
|
||||
|
||||
// END AI actions
|
||||
DebugAI(AI_MSG_INFO, MercPtrs[pSoldier->ubAutoBandagingMedic], String("CancelAIAction: enter combat mode"));
|
||||
DebugAI(AI_MSG_INFO, pSoldier, String("CancelAIAction: enter combat mode"));
|
||||
CancelAIAction( pSoldier, TRUE );
|
||||
|
||||
// turn off AI controlled flag
|
||||
|
||||
Reference in New Issue
Block a user