fix failing unit tests, remove deleted unit from f->units list.

This commit is contained in:
Enno Rehling 2016-09-18 11:46:54 +02:00
parent bb689aa7b6
commit 6c9c460815

View file

@ -439,6 +439,9 @@ int remove_unit(unit ** ulist, unit * u)
*ulist = u->next;
}
if (u->faction && u->faction->units == u) {
u->faction->units = u->nextF;
}
if (u->prevF) {
u->prevF->nextF = u->nextF;
}