crash-bugfixes

This commit is contained in:
Enno Rehling 2002-02-16 15:16:31 +00:00
parent fc079d4394
commit 72e421e6d8
2 changed files with 2 additions and 8 deletions

View File

@ -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",

View File

@ -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;