From c317d63f42ac2fcad72cb43f62b256e4d59fd460 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Fri, 13 Sep 2024 01:20:20 +0300 Subject: [PATCH] Check errors from CreateSemaphore --- source/core/windows/semaphore.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/core/windows/semaphore.cpp b/source/core/windows/semaphore.cpp index e45e4b9..ad338c0 100644 --- a/source/core/windows/semaphore.cpp +++ b/source/core/windows/semaphore.cpp @@ -15,6 +15,8 @@ Semaphore::Semaphore(unsigned limit): priv(new Private) { priv->handle = CreateSemaphore(0, 0, limit, 0); + if(!priv->handle) + throw system_error("CreateSemaphore"); } Semaphore::~Semaphore() -- 2.45.2