mirror of
https://github.com/ddnet/ddnet.git
synced 2024-09-19 01:02:20 +00:00
Merge pull request #8913 from Robyt3/Video-Stop-ASAN-Fix
Fix heap-use-after-free in `CVideo::Stop`
This commit is contained in:
commit
11fd82077a
|
@ -283,6 +283,7 @@ void CVideo::Pause(bool Pause)
|
||||||
void CVideo::Stop()
|
void CVideo::Stop()
|
||||||
{
|
{
|
||||||
dbg_assert(!m_Stopped, "Already stopped");
|
dbg_assert(!m_Stopped, "Already stopped");
|
||||||
|
m_Stopped = true;
|
||||||
|
|
||||||
m_pGraphics->WaitForIdle();
|
m_pGraphics->WaitForIdle();
|
||||||
|
|
||||||
|
@ -341,8 +342,6 @@ void CVideo::Stop()
|
||||||
pSound->PauseAudioDevice();
|
pSound->PauseAudioDevice();
|
||||||
delete ms_pCurrentVideo;
|
delete ms_pCurrentVideo;
|
||||||
pSound->UnpauseAudioDevice();
|
pSound->UnpauseAudioDevice();
|
||||||
|
|
||||||
m_Stopped = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CVideo::NextVideoFrameThread()
|
void CVideo::NextVideoFrameThread()
|
||||||
|
|
Loading…
Reference in a new issue