1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-14 01:14:48 +00:00

Merge pull request #215 from jruderman/kpnull

Fix crash when an unknown princess is in peril
This commit is contained in:
Zeno Rogue 2021-07-11 09:47:03 +02:00 committed by GitHub
commit cac0b57d7c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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]--;