Fix #266: CloseHandle close an invalid handle

This commit is contained in:
yuanyuanxiang
2025-12-26 15:57:27 +01:00
parent 02d86f6ce7
commit 34e7cdb663
33 changed files with 171 additions and 161 deletions

View File

@@ -55,12 +55,12 @@ CAudio::~CAudio()
if (m_hEventWaveIn) {
SetEvent(m_hEventWaveIn);
CloseHandle(m_hEventWaveIn);
SAFE_CLOSE_HANDLE(m_hEventWaveIn);
m_hEventWaveIn = NULL;
}
if (m_hStartRecord) {
SetEvent(m_hStartRecord);
CloseHandle(m_hStartRecord);
SAFE_CLOSE_HANDLE(m_hStartRecord);
m_hStartRecord = NULL;
}