diff options
author | James Brown | 2002-05-09 18:03:07 +0000 |
---|---|---|
committer | James Brown | 2002-05-09 18:03:07 +0000 |
commit | ceb97152c75a2b147e1cee89c053b57866730f61 (patch) | |
tree | 49d9707049e91036bc83def63940f785a5c379d1 | |
parent | 12c2318c769cc506df1c37d193823054e8cce60c (diff) | |
download | scummvm-rg350-ceb97152c75a2b147e1cee89c053b57866730f61.tar.gz scummvm-rg350-ceb97152c75a2b147e1cee89c053b57866730f61.tar.bz2 scummvm-rg350-ceb97152c75a2b147e1cee89c053b57866730f61.zip |
Fix odd Sam and Max iMUSE crash. Thread syncronisation bug?
svn-id: r4256
-rw-r--r-- | sound/imuse.cpp | 7 |
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 + |