avoid triggering null-pointer assert

This commit is contained in:
Enno Rehling 2015-10-13 21:50:23 +02:00
parent 2f35246f8c
commit 67135c8ea3
1 changed files with 4 additions and 1 deletions

View File

@ -79,6 +79,10 @@ void free_faction(faction * f)
free(bm);
}
if (f->spellbook) {
free_spellbook(f->spellbook);
}
while (f->groups) {
group *g = f->groups;
f->groups = g->next;
@ -86,7 +90,6 @@ void free_faction(faction * f)
}
freelist(f->allies);
free_spellbook(f->spellbook);
free(f->email);
free(f->banner);
free(f->passw);