aboutsummaryrefslogtreecommitdiff
path: root/sound/imuse.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sound/imuse.cpp')
-rw-r--r--sound/imuse.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/sound/imuse.cpp b/sound/imuse.cpp
index 70a1ff3508..511c7a1a41 100644
--- a/sound/imuse.cpp
+++ b/sound/imuse.cpp
@@ -4411,6 +4411,13 @@ void IMuseGM::part_changed(Part *part, byte what)
if (!(mc = part->_mc->gm()))
return;
+ if (part->_player == NULL) { /* No player, so dump phantom channel */
+ part->_mc = NULL;
+ mc->_part = NULL;
+ memset(mc->_actives, 0, sizeof(mc->_actives));
+ return;
+ }
+
if (what & pcMod)
midiPitchBend(mc->_chan,
clamp(part->_pitchbend + part->_detune_eff +