aboutsummaryrefslogtreecommitdiff
path: root/src/threading/event.cpp
diff options
context:
space:
mode:
authorCraig Robbins <kde.psych@gmail.com>2016-05-01 16:47:08 +1000
committerCraig Robbins <kde.psych@gmail.com>2016-05-01 17:32:00 +1000
commitc1a0ebb725d6ac05e94cc6ad8507106636b63326 (patch)
treef99602b066e7618d879f38aa2f4b97ccd80272d1 /src/threading/event.cpp
parentc95734654caf1064907926978b2cbbc3601fdae9 (diff)
downloadminetest-c1a0ebb725d6ac05e94cc6ad8507106636b63326.tar.gz
minetest-c1a0ebb725d6ac05e94cc6ad8507106636b63326.tar.bz2
minetest-c1a0ebb725d6ac05e94cc6ad8507106636b63326.zip
Fix use of uninitialised variable in class Event
Diffstat (limited to 'src/threading/event.cpp')
-rw-r--r--src/threading/event.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/threading/event.cpp b/src/threading/event.cpp
index c3c2ca029..b7f16154e 100644
--- a/src/threading/event.cpp
+++ b/src/threading/event.cpp
@@ -25,17 +25,20 @@ DEALINGS IN THE SOFTWARE.
#include "threading/event.h"
-#if __cplusplus < 201103L
Event::Event()
+ : notified(false)
{
-#ifdef _WIN32
+#if __cplusplus < 201103L
+# ifdef _WIN32
event = CreateEvent(NULL, false, false, NULL);
-#else
+# else
pthread_cond_init(&cv, NULL);
pthread_mutex_init(&mutex, NULL);
+# endif
#endif
}
+#if __cplusplus < 201103L
Event::~Event()
{
#ifdef _WIN32