aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
Diffstat (limited to 'scumm')
-rw-r--r--scumm/imuse.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/scumm/imuse.cpp b/scumm/imuse.cpp
index 6e1272b188..0b499f3764 100644
--- a/scumm/imuse.cpp
+++ b/scumm/imuse.cpp
@@ -595,6 +595,13 @@ int IMuseInternal::get_master_volume() {
}
int IMuseInternal::terminate() {
+ // We are going to remove the MIDI drivers,
+ // so first pull any reference to them by
+ // the parts.
+ int i;
+ for (i = 0; i < ARRAYSIZE(_parts); ++i)
+ _parts[i]._mc = 0;
+
if (_midi_adlib) {
_midi_adlib->close();
delete _midi_adlib;