- 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 committed by Emile Belanger
parent e1ce6ea40d
commit f0600091fa

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);