forked from github/server
crash-bugfixes
This commit is contained in:
parent
fc079d4394
commit
72e421e6d8
|
@ -335,15 +335,8 @@ expandrecruit(region * r, request * recruitorders)
|
|||
change_level(unew, SK_AUSDAUER, i);
|
||||
}
|
||||
if (unew!=u) {
|
||||
faction * f = u->faction;
|
||||
unit ** up=&u->next;
|
||||
transfermen(unew, u, unew->number);
|
||||
while (*up!=unew) up=&(*up)->next;
|
||||
assert(unew->next==NULL);
|
||||
*up = NULL;
|
||||
if (f->units==unew) f->units = unew->nextF;
|
||||
uunhash(unew);
|
||||
free(unew);
|
||||
destroy_unit(unew);
|
||||
}
|
||||
if (u->n < u->wants) {
|
||||
ADDMSG(&u->faction->msgs, msg_message("recruit",
|
||||
|
|
|
@ -166,6 +166,7 @@ destroyfaction(faction * f)
|
|||
set_number(u, 0);
|
||||
}
|
||||
f->alive = 0;
|
||||
/* no way! f->units = NULL; */
|
||||
handle_event(&f->attribs, "destroy", f);
|
||||
for (ff = factions; ff; ff = ff->next) {
|
||||
group *g;
|
||||
|
|
Loading…
Reference in New Issue