diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 9cf68192c..10f843fc9 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,3 +1,6 @@ +May 10, 2008 +- Fixed: Need write barriers when modifying SequenceListHead. + May 9, 2008 - Added a new cvar: midi_timiditylike. This re-enables TiMidity handling of GUS patch flags, envelopes, and volume levels, while trying to be closer diff --git a/src/s_sndseq.cpp b/src/s_sndseq.cpp index 282e5961a..e487c9d54 100644 --- a/src/s_sndseq.cpp +++ b/src/s_sndseq.cpp @@ -335,7 +335,10 @@ void DSeqNode::Destroy() m_ParentSeqNode = NULL; } if (SequenceListHead == this) + { SequenceListHead = m_Next; + GC::WriteBarrier(m_Next); + } if (m_Prev) { m_Prev->m_Next = m_Next; @@ -716,11 +719,12 @@ DSeqNode::DSeqNode (int sequence, int modenum) } else { - SequenceListHead->m_Prev = this; - m_Next = SequenceListHead; + SequenceListHead->m_Prev = this; GC::WriteBarrier(SequenceListHead->m_Prev, this); + m_Next = SequenceListHead; GC::WriteBarrier(this, SequenceListHead); SequenceListHead = this; m_Prev = NULL; } + GC::WriteBarrier(this); m_ParentSeqNode = m_ChildSeqNode = NULL; }