From af7db2f8f1df2a77f30f52589832a74cf5408e53 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Tue, 19 Apr 2022 14:56:51 +0300 Subject: [PATCH] Fix panic on thrown potion of acid when swallowed When you're swallowed and throw a missile that kills the swallower, the thrown missile is picked up by the swallower before death. This caused a panic when you threw a potion, which was first picked up by the swallower, which upon death dropped the potion on the floor, but then throw code was trying to destroy the potion ... --- src/mon.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mon.c b/src/mon.c index 67b92a377..93ec686e0 100644 --- a/src/mon.c +++ b/src/mon.c @@ -2989,6 +2989,8 @@ xkilled( EDOG(mtmp)->killed_by_u = 1; if (wasinside && g.thrownobj && g.thrownobj != uball + /* don't give to mon if missile is going to be destroyed */ + && g.thrownobj->oclass != POTION_CLASS /* don't give to mon if missile is going to return to hero */ && g.thrownobj != (struct obj *) iflags.returning_missile) { /* thrown object has killed hero's engulfer; add it to mon's