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);
|
change_level(unew, SK_AUSDAUER, i);
|
||||||
}
|
}
|
||||||
if (unew!=u) {
|
if (unew!=u) {
|
||||||
faction * f = u->faction;
|
|
||||||
unit ** up=&u->next;
|
|
||||||
transfermen(unew, u, unew->number);
|
transfermen(unew, u, unew->number);
|
||||||
while (*up!=unew) up=&(*up)->next;
|
destroy_unit(unew);
|
||||||
assert(unew->next==NULL);
|
|
||||||
*up = NULL;
|
|
||||||
if (f->units==unew) f->units = unew->nextF;
|
|
||||||
uunhash(unew);
|
|
||||||
free(unew);
|
|
||||||
}
|
}
|
||||||
if (u->n < u->wants) {
|
if (u->n < u->wants) {
|
||||||
ADDMSG(&u->faction->msgs, msg_message("recruit",
|
ADDMSG(&u->faction->msgs, msg_message("recruit",
|
||||||
|
|
|
@ -166,6 +166,7 @@ destroyfaction(faction * f)
|
||||||
set_number(u, 0);
|
set_number(u, 0);
|
||||||
}
|
}
|
||||||
f->alive = 0;
|
f->alive = 0;
|
||||||
|
/* no way! f->units = NULL; */
|
||||||
handle_event(&f->attribs, "destroy", f);
|
handle_event(&f->attribs, "destroy", f);
|
||||||
for (ff = factions; ff; ff = ff->next) {
|
for (ff = factions; ff; ff = ff->next) {
|
||||||
group *g;
|
group *g;
|
||||||
|
|
Loading…
Reference in New Issue