aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
Diffstat (limited to 'scumm')
-rw-r--r--scumm/imuse_digi/dimuse.h2
-rw-r--r--scumm/scummvm.cpp9
2 files changed, 6 insertions, 5 deletions
diff --git a/scumm/imuse_digi/dimuse.h b/scumm/imuse_digi/dimuse.h
index fb896e0429..d611746799 100644
--- a/scumm/imuse_digi/dimuse.h
+++ b/scumm/imuse_digi/dimuse.h
@@ -97,7 +97,7 @@ private:
public:
IMuseDigital(ScummEngine *scumm);
- ~IMuseDigital();
+ virtual ~IMuseDigital();
void startVoice(int soundId, AudioStream *input)
{ debug(5, "startVoiceStream(%d)", soundId); startSound(soundId, NULL, 0, IMUSE_VOICE, input); }
diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp
index 04f7a33d54..35f7952610 100644
--- a/scumm/scummvm.cpp
+++ b/scumm/scummvm.cpp
@@ -851,6 +851,11 @@ ScummEngine::ScummEngine(GameDetector *detector, OSystem *syst, const ScummGameS
}
ScummEngine::~ScummEngine() {
+ if (_musicEngine) {
+ _musicEngine->terminate();
+ delete _musicEngine;
+ }
+
_mixer->stopAll();
delete [] _actors;
@@ -862,10 +867,6 @@ ScummEngine::~ScummEngine() {
delete _mainMenuDialog;
delete _sound;
- if (_musicEngine) {
- _musicEngine->terminate();
- delete _musicEngine;
- }
free(_languageBuffer);
free(_audioNames);