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

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