From 9eb14f684c0fb9a44343cb49a3ab6afdfeb615a2 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Sat, 14 Nov 2015 17:41:27 +0200 Subject: [PATCH] Extract guard gold before disposing it If the gold is still in monster inventory, dealloc_obj will panic. --- src/steal.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/steal.c b/src/steal.c index 94fcaca2e..4b5378d96 100644 --- a/src/steal.c +++ b/src/steal.c @@ -676,6 +676,7 @@ boolean is_pet; /* If true, pet should keep wielded/worn items */ if (canspotmon(mtmp)) pline("%s gold %s.", s_suffix(Monnam(mtmp)), canseemon(mtmp) ? "vanishes" : "seems to vanish"); + obj_extract_self(otmp); obfree(otmp, (struct obj *) 0); } /* isgd && has gold */ -- 2.40.0