Extract guard gold before disposing it

If the gold is still in monster inventory, dealloc_obj will panic.
This commit is contained in:
Pasi Kallinen
2015-11-14 17:41:27 +02:00
parent 272d32b343
commit 9eb14f684c

View File

@@ -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 */