From 5d4a4ca7fb6b21d7da25a1408aa9f32892939d41 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sat, 16 Dec 2023 11:11:30 -0500 Subject: [PATCH] Revert "remove mon guard from _see_with_infrared(mon),_is_safemon(mon)" This reverts commit 91fdc1104a0927a7916dd6bdd9821e9a46c955d7 while an issue is investigated further.. --- include/display.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/display.h b/include/display.h index b5b08c36d..20c6cead6 100644 --- a/include/display.h +++ b/include/display.h @@ -104,7 +104,7 @@ * canseemon() or canspotmon() which already check that. */ #define _see_with_infrared(mon) \ - (!Blind && Infravision && infravisible(mon->data) \ + (!Blind && Infravision && mon && infravisible(mon->data) \ && couldsee(mon->mx, mon->my)) /* @@ -157,7 +157,7 @@ * definition here is convenient. No longer limited to pets. */ #define _is_safemon(mon) \ - (flags.safe_dog && (mon)->mpeaceful && canspotmon(mon) \ + (flags.safe_dog && (mon) && (mon)->mpeaceful && canspotmon(mon) \ && !Confusion && !Hallucination && !Stunned) /*