22480 Dereference after null check

This commit is contained in:
Enno Rehling 2015-11-04 14:19:43 +01:00
parent eea0186601
commit 0a5bd9d356
1 changed files with 1 additions and 1 deletions

View File

@ -480,7 +480,7 @@ void pick_random_spells(faction * f, int level, spellbook * book, int num_spells
}
}
if (spellno < maxspell) {
if (sbe && spellno < maxspell) {
if (!f->spellbook) {
f->spellbook = create_spellbook(0);
}