From 461f3e6bf5f7f6314ea447458b54661e3aae6091 Mon Sep 17 00:00:00 2001 From: Alug Date: Wed, 10 Dec 2025 19:13:07 +0100 Subject: [PATCH] Revert "Fix use-after-free when mobj is removed while still playing sounds" This reverts commit 3bdc745bd15f5742c41f560c5f7c397bc5ca8a7a. --- src/p_setup.c | 2 -- src/s_sound.c | 7 +------ 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/src/p_setup.c b/src/p_setup.c index 185b74191..34c47b450 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -815,8 +815,6 @@ static void P_LoadSectors(UINT8 *data) ss->tag = SHORT(ms->tag); ss->flags |= SF_FLIPSPECIAL_FLOOR; - - ss->soundorg.thinker.function = (actionf_p1)P_MobjThinker; } // set the sky flat num diff --git a/src/s_sound.c b/src/s_sound.c index 743daad64..bc7fb7165 100644 --- a/src/s_sound.c +++ b/src/s_sound.c @@ -776,14 +776,9 @@ void S_UpdateSounds(void) volume = c->volume; // 8 bits internal volume precision sep = NORM_SEP; - if (P_MobjWasRemoved(c->origin)) - { - // origin was removed, stop the music - S_StopChannel(cnum); - } // check non-local sounds for distance clipping // or modify their params - else + if (c->origin) { boolean itsUs = false;