aboutsummaryrefslogtreecommitdiff
path: root/scumm/scummvm.cpp
diff options
context:
space:
mode:
authorJamieson Christian2003-09-28 00:03:24 +0000
committerJamieson Christian2003-09-28 00:03:24 +0000
commit044bcd5430a9ba1b19e10d4d4e3a193358166991 (patch)
tree3af39ea65d71f9de3deedb3c116d782fa97b9b8d /scumm/scummvm.cpp
parent1d40ce68c2fd93abdef86989ae534b124f175068 (diff)
downloadscummvm-rg350-044bcd5430a9ba1b19e10d4d4e3a193358166991.tar.gz
scummvm-rg350-044bcd5430a9ba1b19e10d4d4e3a193358166991.tar.bz2
scummvm-rg350-044bcd5430a9ba1b19e10d4d4e3a193358166991.zip
Added terminate() to the MusicEngine and publicized
the iMuse implementation. This allows the termination sequence to be done BEFORE object destruction, so that the destructor is not making calls that may not be appropriate during object destruction. (Virtual functions were the concern, although I'm not sure any of that was happening anyway. Oh well, better to be safe than sorry.) I implemented an empty terminate() in the base class, but the other MusicEngine derivatives may have stuff in their destructors that should be moved to this method. I didn't check. svn-id: r10452
Diffstat (limited to 'scumm/scummvm.cpp')
-rw-r--r--scumm/scummvm.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp
index fcdad80ae9..410458be5c 100644
--- a/scumm/scummvm.cpp
+++ b/scumm/scummvm.cpp
@@ -824,7 +824,10 @@ Scumm::~Scumm () {
delete _confirmExitDialog;
delete _sound;
- delete _musicEngine;
+ if (_musicEngine) {
+ _musicEngine->terminate();
+ delete _musicEngine;
+ }
free(_languageBuffer);
free(_audioNames);