spellbook_clear crash fix

This commit is contained in:
Enno Rehling 2016-09-07 19:02:03 +02:00
parent dd2f146e27
commit 282cc129d7
1 changed files with 3 additions and 1 deletions

View File

@ -230,7 +230,9 @@ void free_equipment(void) {
equipment *eq = *eqp;
*eqp = eq->next;
free(eq->name);
if (eq->spellbook) {
spellbook_clear(eq->spellbook);
}
// TODO: items, subsets
free(eq);
}