summaryrefslogtreecommitdiff
path: root/indra/llcommon/llthread.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llcommon/llthread.h')
-rw-r--r--indra/llcommon/llthread.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/indra/llcommon/llthread.h b/indra/llcommon/llthread.h
index 40291a2569..b0a1c9e12b 100644
--- a/indra/llcommon/llthread.h
+++ b/indra/llcommon/llthread.h
@@ -187,11 +187,18 @@ public:
LLMutexLock(LLMutex* mutex)
{
mMutex = mutex;
- mMutex->lock();
+
+ if(mMutex)
+ {
+ mMutex->lock();
+ }
}
~LLMutexLock()
{
- mMutex->unlock();
+ if(mMutex)
+ {
+ mMutex->unlock();
+ }
}
private:
LLMutex* mMutex;