From 5e2236a3ef27555e9d86384909c2bf49dbf08e7f Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Thu, 10 Jan 2019 21:47:04 +0200 Subject: [PATCH] Fix accessing deleted fire trap melt_ice can delete the fire trap, in the case where the trap is on ice, and a monster carrying a boulder triggers it, then drowns. mintrap -> minliquid -> mondead -> ... -> mdrop_obj -> flooreffects -> boulder_hits_pool -> delfloortrap --- src/trap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/trap.c b/src/trap.c index 965c9347e..50f74b79c 100644 --- a/src/trap.c +++ b/src/trap.c @@ -2421,7 +2421,7 @@ register struct monst *mtmp; You("smell smoke."); if (is_ice(mtmp->mx, mtmp->my)) melt_ice(mtmp->mx, mtmp->my, (char *) 0); - if (see_it) + if (see_it && t_at(mtmp->mx, mtmp->my)) seetrap(trap); break; case PIT: