From 56159742c26ba7e3cb8da016bfe923ef0cc2695b Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Sat, 23 Sep 2023 17:25:21 +0300 Subject: [PATCH] Prevent segfault for non-existent trap If a buried zombie under stairs revived --- src/do.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/do.c b/src/do.c index e50a00b6b..3a667763f 100644 --- a/src/do.c +++ b/src/do.c @@ -2128,7 +2128,8 @@ revive_corpse(struct obj *corpse) struct trap *ttmp; ttmp = t_at(mtmp->mx, mtmp->my); - ttmp->tseen = TRUE; + if (ttmp) + ttmp->tseen = TRUE; pline("%s claws itself out of the ground!", canspotmon(mtmp) ? Amonnam(mtmp) : Something); newsym(mtmp->mx, mtmp->my);