Prevent segfault for non-existent trap

If a buried zombie under stairs revived
This commit is contained in:
Pasi Kallinen
2023-09-23 17:25:21 +03:00
parent e4c3d87a4c
commit 56159742c2

View File

@@ -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);