summaryrefslogtreecommitdiff
path: root/include/threadengines
diff options
context:
space:
mode:
Diffstat (limited to 'include/threadengines')
-rw-r--r--include/threadengines/threadengine_win32.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/threadengines/threadengine_win32.h b/include/threadengines/threadengine_win32.h
index 9ca180cef..f068ac707 100644
--- a/include/threadengines/threadengine_win32.h
+++ b/include/threadengines/threadengine_win32.h
@@ -108,12 +108,15 @@ class ThreadQueueData
public:
ThreadQueueData()
{
- InitializeCriticalSection(&mutex);
event = CreateEvent(NULL, false, false, NULL);
+ if (event == NULL)
+ throw CoreException("CreateEvent() failed in ThreadQueueData::ThreadQueueData()!");
+ InitializeCriticalSection(&mutex);
}
~ThreadQueueData()
{
+ CloseHandle(event);
DeleteCriticalSection(&mutex);
}