summaryrefslogtreecommitdiffstats
path: root/source/cCriticalSection.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--source/cCriticalSection.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/cCriticalSection.cpp b/source/cCriticalSection.cpp
index 95ee77c3d..d7498aa5f 100644
--- a/source/cCriticalSection.cpp
+++ b/source/cCriticalSection.cpp
@@ -107,6 +107,12 @@ cCSLock::cCSLock(cCriticalSection & a_CS)
cCSLock::~cCSLock()
{
+ #ifdef _DEBUG
+ if (!m_IsLocked)
+ {
+ return;
+ }
+ #endif // _DEBUG
Unlock();
}