From d70fadda94a46dc65e7880e3c7211df07ed3257f Mon Sep 17 00:00:00 2001 From: Fabian Greffrath Date: Tue, 6 Jul 2021 08:25:55 +0200 Subject: [PATCH] ignore request to play no sound i.e. let S_StartSound() return gracefully if (sfx_id == sfx_None). --- Source/s_sound.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Source/s_sound.c b/Source/s_sound.c index a5a2c6f5..525ded01 100644 --- a/Source/s_sound.c +++ b/Source/s_sound.c @@ -290,6 +290,10 @@ void S_StartSound(const mobj_t *origin, int sfx_id) if(!snd_card || nosfxparm) return; + // [FG] ignore request to play no sound + if(sfx_id == sfx_None) + return; + #ifdef RANGECHECK // check for bogus sound # if(sfx_id < 1 || sfx_id > NUMSFX)