Skip to content

Commit

Permalink
- fixed potential crash when sound sequence is destroyed
Browse files Browse the repository at this point in the history
Level can be unset if sound sequence destruction happens after saved game loading failure

https://forum.zdoom.org/viewtopic.php?t=72551
  • Loading branch information
alexey-lysiuk committed Jun 14, 2021
1 parent 4e46a83 commit cf4c72d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sound/s_sndseq.cpp
Expand Up @@ -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);
Expand Down

0 comments on commit cf4c72d

Please sign in to comment.