forked from github/server
avoid triggering null-pointer assert
This commit is contained in:
parent
2f35246f8c
commit
67135c8ea3
|
@ -79,6 +79,10 @@ void free_faction(faction * f)
|
||||||
free(bm);
|
free(bm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (f->spellbook) {
|
||||||
|
free_spellbook(f->spellbook);
|
||||||
|
}
|
||||||
|
|
||||||
while (f->groups) {
|
while (f->groups) {
|
||||||
group *g = f->groups;
|
group *g = f->groups;
|
||||||
f->groups = g->next;
|
f->groups = g->next;
|
||||||
|
@ -86,7 +90,6 @@ void free_faction(faction * f)
|
||||||
}
|
}
|
||||||
freelist(f->allies);
|
freelist(f->allies);
|
||||||
|
|
||||||
free_spellbook(f->spellbook);
|
|
||||||
free(f->email);
|
free(f->email);
|
||||||
free(f->banner);
|
free(f->banner);
|
||||||
free(f->passw);
|
free(f->passw);
|
||||||
|
|
Loading…
Reference in New Issue