Fix crash when an unknown princess is in peril

This commit is contained in:
Jesse Ruderman 2021-07-10 18:57:54 -07:00
parent 8f8cbfd4c7
commit 42f8f5f4cc
1 changed files with 1 additions and 1 deletions

View File

@ -512,8 +512,8 @@ EX void killMonster(cell *c, eMonster who, flagtype deathflags IS(0)) {
if(m == moPrincess) {
princess::info *i = princess::getPrincessInfo(c);
changes.value_keep(*i);
if(i) {
changes.value_keep(*i);
i->princess = NULL;
if(i->bestdist == OUT_OF_PALACE) {
items[itSavedPrincess]--;