aboutsummaryrefslogtreecommitdiff
path: root/source/Host/common/Mutex.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/Host/common/Mutex.cpp')
-rw-r--r--source/Host/common/Mutex.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/Host/common/Mutex.cpp b/source/Host/common/Mutex.cpp
index 4e0135535628..c26467fa0d79 100644
--- a/source/Host/common/Mutex.cpp
+++ b/source/Host/common/Mutex.cpp
@@ -242,9 +242,9 @@ Mutex::Mutex (Mutex::Type type) :
//----------------------------------------------------------------------
Mutex::~Mutex()
{
+#if ENABLE_MUTEX_ERROR_CHECKING
int err = ::pthread_mutex_destroy (&m_mutex);
assert(err == 0);
-#if ENABLE_MUTEX_ERROR_CHECKING
if (err == 0)
error_check_mutex (&m_mutex, eMutexActionDestroyed);
else
@@ -253,6 +253,8 @@ Mutex::~Mutex()
assert(err == 0);
}
memset (&m_mutex, '\xba', sizeof(m_mutex));
+#else
+ ::pthread_mutex_destroy (&m_mutex);
#endif
}