Fix #13921, d95422561b: [Win32] Don't try close an already closed event handle during destruction.

This commit is contained in:
Michael Lutz 2025-03-30 13:54:54 +02:00
parent 56af0b29f5
commit 68ff7e5209

View File

@ -1195,7 +1195,10 @@ void MusicDriver_DMusic::Stop()
_music = nullptr;
}
CloseHandle(_thread_event);
if (_thread_event != nullptr) {
CloseHandle(_thread_event);
_thread_event = nullptr;
}
CoUninitialize();
}