Fixed crash when exiting
This commit is contained in:
parent
f389378218
commit
4aca501ab8
1 changed files with 3 additions and 1 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue