From ceb97152c75a2b147e1cee89c053b57866730f61 Mon Sep 17 00:00:00 2001 From: James Brown Date: Thu, 9 May 2002 18:03:07 +0000 Subject: [PATCH] Fix odd Sam and Max iMUSE crash. Thread syncronisation bug? svn-id: r4256 --- sound/imuse.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sound/imuse.cpp b/sound/imuse.cpp index 70a1ff3508c..511c7a1a417 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 +