- fixed potential crash when sound sequence is destroyed

Level can be unset if sound sequence destruction happens after saved game loading failure

https://forum.zdoom.org/viewtopic.php?t=72551
This commit is contained in:
alexey.lysiuk 2021-06-14 09:30:51 +03:00
parent 4e46a83734
commit cf4c72d4a7

View file

@ -395,7 +395,7 @@ void DSeqNode::OnDestroy()
m_ParentSeqNode->m_ChildSeqNode = nullptr;
m_ParentSeqNode = nullptr;
}
if (Level->SequenceListHead == this)
if (Level && Level->SequenceListHead == this)
{
Level->SequenceListHead = m_Next;
GC::WriteBarrier(m_Next);