S_SoundTestPlay: Exit early into S_SoundTestStop if current entry is NULL

This commit is contained in:
toaster 2023-03-28 01:31:39 +01:00
parent 53b24067ee
commit 3d40e83700

View file

@ -1403,19 +1403,18 @@ conclusion:
if (soundtest.playing == true) if (soundtest.playing == true)
{ {
if (newdef == NULL) S_SoundTestPlay();
{
S_SoundTestStop(false);
}
else
{
S_SoundTestPlay();
}
} }
} }
void S_SoundTestPlay(void) void S_SoundTestPlay(void)
{ {
if (soundtest.current == NULL)
{
S_SoundTestStop(false);
return;
}
soundtest.privilegedrequest = true; soundtest.privilegedrequest = true;
S_StopMusic(); S_StopMusic();