Add missing Iter->Exists() checks

This commit is contained in:
Asdow
2026-06-12 15:52:24 +03:00
parent 6a8a22aba2
commit db15679ec1
5 changed files with 21 additions and 21 deletions
+1 -1
View File
@@ -14668,7 +14668,7 @@ void SOLDIERTYPE::SoldierInventoryCoolDown( void )
attachmentList::iterator iterend = (*pObj)[0]->attachments.end( );
for ( attachmentList::iterator iter = (*pObj)[0]->attachments.begin( ); iter != iterend; ++iter )
{
if ( Item[iter->usItem].usFlashLightRange )
if ( iter->exists() && Item[iter->usItem].usFlashLightRange )
flashlightfound = TRUE;
}
}