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:24 +03:00
parent e4c3d87a4c
commit 56159742c2
+1
View File
@@ -2128,6 +2128,7 @@ revive_corpse(struct obj *corpse)
struct trap *ttmp; struct trap *ttmp;
ttmp = t_at(mtmp->mx, mtmp->my); ttmp = t_at(mtmp->mx, mtmp->my);
if (ttmp)
ttmp->tseen = TRUE; ttmp->tseen = TRUE;
pline("%s claws itself out of the ground!", pline("%s claws itself out of the ground!",
canspotmon(mtmp) ? Amonnam(mtmp) : Something); canspotmon(mtmp) ? Amonnam(mtmp) : Something);