]> granicus.if.org Git - nethack/commitdiff
Fix the part I forgot
authorPasi Kallinen <paxed@alt.org>
Thu, 9 Feb 2023 06:33:32 +0000 (08:33 +0200)
committerPasi Kallinen <paxed@alt.org>
Thu, 9 Feb 2023 06:33:32 +0000 (08:33 +0200)
src/mon.c

index fa6d3581a99c6a5af60da43764e6ae9fc3feb2d5..5375769f39d5843e87786183da14453dbd2728a7 100644 (file)
--- a/src/mon.c
+++ b/src/mon.c
@@ -4133,7 +4133,7 @@ maybe_unhide_at(coordxy x, coordxy y)
     if ((mtmp = m_at(x, y)) == 0 && u_at(x, y)) {
         mtmp = &gy.youmonst;
         undetected = u.uundetected;
-    } else {
+    } else if (mtmp) {
         undetected = mtmp->mundetected;
     }
     if (mtmp && undetected