From e3de8ae75f865a7a3f0b6ddc3abaa66b37f1a176 Mon Sep 17 00:00:00 2001 From: Sryder Date: Tue, 13 Mar 2018 02:51:14 +0000 Subject: [PATCH] Stop touching a random item box crashing debug builds --- src/p_inter.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/p_inter.c b/src/p_inter.c index 7d4b70c7..0da3d01a 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -1553,8 +1553,11 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck) } } - S_StartSound(toucher, special->info->deathsound); // was NULL, but changed to player so you could hear others pick up rings - P_KillMobj(special, NULL, toucher); + if (!P_MobjWasRemoved(special)) + { + S_StartSound(toucher, special->info->deathsound); // was NULL, but changed to player so you could hear others pick up rings + P_KillMobj(special, NULL, toucher); + } } //