forked from github/server
fix failing unit tests, remove deleted unit from f->units list.
This commit is contained in:
parent
bb689aa7b6
commit
6c9c460815
1 changed files with 3 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue