mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 06:28:19 +00:00
Ensure editor preview image and sound are unloaded properly
The preview image was previously not unloaded and the preview state was not reset.
This commit is contained in:
parent
3b0d9cd6c9
commit
941a302c4d
|
@ -8710,11 +8710,10 @@ void CEditor::OnClose()
|
|||
|
||||
void CEditor::OnDialogClose()
|
||||
{
|
||||
if(m_FilePreviewSound >= 0)
|
||||
{
|
||||
Sound()->UnloadSample(m_FilePreviewSound);
|
||||
m_FilePreviewSound = -1;
|
||||
}
|
||||
Graphics()->UnloadTexture(&m_FilePreviewImage);
|
||||
Sound()->UnloadSample(m_FilePreviewSound);
|
||||
m_FilePreviewSound = -1;
|
||||
m_FilePreviewState = PREVIEW_UNLOADED;
|
||||
}
|
||||
|
||||
void CEditor::LoadCurrentMap()
|
||||
|
|
Loading…
Reference in a new issue