Fixed crash when exiting

This commit is contained in:
Sour 2019-03-31 15:15:25 -04:00
parent f389378218
commit 4aca501ab8

View file

@ -24,7 +24,9 @@ SoundManager::SoundManager(shared_ptr<Console> console, HWND hwnd)
SoundManager::~SoundManager()
{
_console->GetSoundMixer()->RegisterAudioDevice(nullptr);
if(_console && _console->GetSoundMixer()) {
_console->GetSoundMixer()->RegisterAudioDevice(nullptr);
}
Release();
}