From: Mikko Rasa Date: Thu, 12 Sep 2024 22:20:20 +0000 (+0300) Subject: Check errors from CreateSemaphore X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;p=libs%2Fcore.git Check errors from CreateSemaphore --- 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()