- Fixed: Need write barriers when modifying SequenceListHead.

SVN r962 (trunk)
This commit is contained in:
Randy Heit 2008-05-11 01:26:28 +00:00
parent 569fdb7edf
commit 6f7c6e4dac
2 changed files with 9 additions and 2 deletions

View file

@ -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

View file

@ -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;
}