mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Move nullptr check to be checked first
Kinda defeats the purpose of checking for nullptr if we dereference it before the check, no?
This commit is contained in:
@@ -1993,8 +1993,8 @@ INT32 GetTotalFacilityHourlyCosts( BOOLEAN fPositive )
|
||||
pSoldier = gCharactersList[ ubCounter ].usSolID;
|
||||
|
||||
// Is character truly valid?
|
||||
if( !( pSoldier->flags.uiStatusFlags & SOLDIER_VEHICLE ) &&
|
||||
pSoldier->bSectorZ == 0 && pSoldier != NULL &&
|
||||
if( pSoldier != NULL && !( pSoldier->flags.uiStatusFlags & SOLDIER_VEHICLE ) &&
|
||||
pSoldier->bSectorZ == 0 &&
|
||||
pSoldier->stats.bLife >= OKLIFE &&
|
||||
!(pSoldier->flags.fMercAsleep) )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user