Fixed crash when a unit was destroyed in HandleBuffs

This commit is contained in:
wizzard 2004-01-30 06:02:43 +00:00
parent 9182d5161b
commit 7672e340a6

View file

@ -532,6 +532,10 @@ global void UnitActions(void)
if (buffsthiscycle) {
for (i = 0; i < tabsize; ++i) {
HandleBuffs(table[i], CYCLES_PER_SECOND);
if (table[i]->Destroyed) {
table[i] = table[--tabsize];
--i;
}
}
}
@ -554,7 +558,7 @@ global void UnitActions(void)
HandleUnitAction(unit);
#ifdef DEBUG_ACTIONS
#ifdef DEBUG
//
// Dump the unit to find the network sync bugs.
//