From fda1f26fbd7887e91a29eb7ad0c74bfa14bf34fe Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Sun, 1 Dec 2024 12:44:29 +0100 Subject: [PATCH] fixed a crash with Grail --- items.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/items.cpp b/items.cpp index 120c1388..58d61f85 100644 --- a/items.cpp +++ b/items.cpp @@ -260,8 +260,10 @@ EX bool collectItem(cell *c2, cell *last, bool telekinesis IS(false)) { items[itOrbSpeed] += v; items[itHolyGrail]++; addMessage(XLAT("Congratulations! You have found the Holy Grail!")); - if(!eubinary) changes.value_keep(c2->master->alt->emeraldval); - if(!eubinary) c2->master->alt->emeraldval |= GRAIL_FOUND; + if(!eubinary && c2->master->alt) { + changes.value_keep(c2->master->alt->emeraldval); + c2->master->alt->emeraldval |= GRAIL_FOUND; + } achievement_collection(c2->item); } else if(c2->item == itKey) {