Fix segfault when trying to read target of droid with no target in aiUpdateStructure.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7927 4a71c877-e1ca-e34f-864e-861f7616d084master
parent
f69561117e
commit
d1bf617727
|
@ -3106,7 +3106,7 @@ static void aiUpdateStructure(STRUCTURE *psStructure, bool mission)
|
|||
}
|
||||
// Second highest priority:
|
||||
// Help out another nearby repair facility
|
||||
else if (mindist > (TILE_UNITS*8)*(TILE_UNITS*8)
|
||||
else if (psTarget && mindist > (TILE_UNITS*8)*(TILE_UNITS*8)
|
||||
&& psTarget != (BASE_OBJECT *)psStructure && psDroid->action == DACTION_WAITFORREPAIR)
|
||||
{
|
||||
REPAIR_FACILITY *stealFrom = &((STRUCTURE *)psTarget)->pFunctionality->repairFacility;
|
||||
|
|
Loading…
Reference in New Issue