Fix a commander-related crash.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4155 4a71c877-e1ca-e34f-864e-861f7616d084
master
Roman C 2008-03-19 15:58:36 +00:00
parent d2d6f60852
commit 81de4a1622
1 changed files with 2 additions and 1 deletions

View File

@ -1184,7 +1184,8 @@ void orderUpdateDroid(DROID *psDroid)
}
// make sure units in a command group are actually guarding the commander
if (!orderStateObj(psDroid, DORDER_GUARD)
psObj = orderStateObj(psDroid, DORDER_GUARD); // find out who is being guarded by the droid
if (psObj == NULL
|| psObj != (BASE_OBJECT *)psDroid->psGroup->psCommander)
{
orderDroidObj(psDroid, DORDER_GUARD, (BASE_OBJECT *)psDroid->psGroup->psCommander);