diff options
author | Paul Gilbert | 2014-10-14 21:26:00 -0400 |
---|---|---|
committer | Paul Gilbert | 2014-10-14 21:26:00 -0400 |
commit | b5fb32de5ea2a4f3dd4133c423d666d00f37744f (patch) | |
tree | 059f1faad721810412f2e3823c99b691fc7f22e1 | |
parent | c4a829a7c61e55b98f926a079f4c06ba029f02fa (diff) | |
download | scummvm-rg350-b5fb32de5ea2a4f3dd4133c423d666d00f37744f.tar.gz scummvm-rg350-b5fb32de5ea2a4f3dd4133c423d666d00f37744f.tar.bz2 scummvm-rg350-b5fb32de5ea2a4f3dd4133c423d666d00f37744f.zip |
MADS: Fix to exit game safely when sound driver hasn't been created
-rw-r--r-- | engines/mads/sound.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/engines/mads/sound.cpp b/engines/mads/sound.cpp index 9d0d9c8d20..d0aa770a4d 100644 --- a/engines/mads/sound.cpp +++ b/engines/mads/sound.cpp @@ -42,9 +42,11 @@ SoundManager::SoundManager(MADSEngine *vm, Audio::Mixer *mixer) { } SoundManager::~SoundManager() { - _driver->stop(); + if (_driver) { + _driver->stop(); + delete _driver; + } - delete _driver; delete _opl; } |