From b9d781e0b268a49cd0576e5f1cd6813dc177fad0 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Tue, 6 Jan 2026 20:58:13 +0200 Subject: [PATCH] Fix segfault when carried box explodes Opening a trapped box in inventory, if the box exploded and was not destroyed, then temporary variable otmp was pointing to null. --- src/trap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/trap.c b/src/trap.c index a5602cd5a..41f2cad94 100644 --- a/src/trap.c +++ b/src/trap.c @@ -6400,7 +6400,7 @@ chest_trap( bot(); /* to get immediate botl re-display */ } - otmp->tknown = 1; /* hero knows chest is no longer trapped */ + obj->tknown = 1; /* hero knows chest is no longer trapped */ return FALSE; }