Fixed crash when a unit was destroyed in HandleBuffs
This commit is contained in:
parent
9182d5161b
commit
7672e340a6
1 changed files with 5 additions and 1 deletions
|
@ -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.
|
||||
//
|
||||
|
|
Loading…
Add table
Reference in a new issue