From cf4c72d4a7403baf0cfda9daa422919c6b05f783 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Mon, 14 Jun 2021 09:30:51 +0300 Subject: [PATCH] - 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 --- src/sound/s_sndseq.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sound/s_sndseq.cpp b/src/sound/s_sndseq.cpp index 4c7702a88..abe16c3c8 100644 --- a/src/sound/s_sndseq.cpp +++ b/src/sound/s_sndseq.cpp @@ -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);