- fixed crash on exiting from IWAD selector

https://forum.zdoom.org/viewtopic.php?t=66073
This commit is contained in:
alexey.lysiuk 2019-10-09 15:05:20 +03:00 committed by drfrag
parent 6c78556c09
commit a5d3be2569

View file

@ -353,7 +353,9 @@ void S_Shutdown ()
mus_playing.LastSong = ""; // If this isn't reset here, the song would attempt resume at the most inpopportune time...
S_StopAllChannels();
GSnd->UpdateSounds();
if (GSnd)
GSnd->UpdateSounds();
for (chan = FreeChannels; chan != NULL; chan = next)
{
next = chan->NextChan;
@ -1747,7 +1749,9 @@ void S_StopAllChannels ()
S_StopChannel(chan);
chan = next;
}
GSnd->UpdateSounds();
if (GSnd)
GSnd->UpdateSounds();
}
//==========================================================================