mirror of
https://github.com/ZDoom/Raze.git
synced 2025-03-13 20:42:11 +00:00
-Blood: fix crashes when trying to exit from a fatal error during startup.
soundEngine can be null here.
This commit is contained in:
parent
789794539c
commit
b6eadbccb5
2 changed files with 2 additions and 2 deletions
|
@ -265,7 +265,7 @@ void sfxKill3DSound(DBloodActor* pActor, int a2, int a3)
|
|||
|
||||
void sfxKillAllSounds(void)
|
||||
{
|
||||
soundEngine->EnumerateChannels([](FSoundChan* channel)
|
||||
if (soundEngine) soundEngine->EnumerateChannels([](FSoundChan* channel)
|
||||
{
|
||||
if (channel->SourceType == SOURCE_Actor || channel->SourceType == SOURCE_Unattached) soundEngine->StopChannel(channel);
|
||||
return false;
|
||||
|
|
|
@ -218,7 +218,7 @@ void sndStartWavDisk(const char* pzFile, int nVolume, int nChannel)
|
|||
|
||||
void sndKillAllSounds(void)
|
||||
{
|
||||
soundEngine->StopSound(CHAN_AUTO);
|
||||
if (soundEngine) soundEngine->StopSound(CHAN_AUTO);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue