]> git.tdb.fi Git - libs/core.git/commitdiff
Check errors from CreateSemaphore master
authorMikko Rasa <tdb@tdb.fi>
Thu, 12 Sep 2024 22:20:20 +0000 (01:20 +0300)
committerMikko Rasa <tdb@tdb.fi>
Thu, 12 Sep 2024 22:20:20 +0000 (01:20 +0300)
source/core/windows/semaphore.cpp

index e45e4b9f70f921c02166a79be99fdc5dd21e05ce..ad338c04abecddbdbb071d007e024d55963ab692 100644 (file)
@@ -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()