summaryrefslogtreecommitdiff
path: root/indra/llcommon/llthread.h
diff options
context:
space:
mode:
authorXiaohong Bao <bao@lindenlab.com>2011-12-15 21:39:48 -0700
committerXiaohong Bao <bao@lindenlab.com>2011-12-15 21:39:48 -0700
commitefec138037d7271effd89536d824bec270985909 (patch)
tree57c0f5165fcdb4d428bba8ab4cef6dcc401b7ece /indra/llcommon/llthread.h
parent16b6a472477bd389771fe4022e425f77ca85c2bd (diff)
fix for SH-2738 and SH-2777, might also help SH-2723: heap corruption
SH-2738: Texture fetching freezes due to LLcurl SH-2777: viewer crashed on logout in LLCurl::Easy::releaseEasyHandle
Diffstat (limited to 'indra/llcommon/llthread.h')
-rw-r--r--indra/llcommon/llthread.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/indra/llcommon/llthread.h b/indra/llcommon/llthread.h
index 40291a2569..f0e0de6173 100644
--- a/indra/llcommon/llthread.h
+++ b/indra/llcommon/llthread.h
@@ -187,11 +187,14 @@ public:
LLMutexLock(LLMutex* mutex)
{
mMutex = mutex;
- mMutex->lock();
+
+ if(mMutex)
+ mMutex->lock();
}
~LLMutexLock()
{
- mMutex->unlock();
+ if(mMutex)
+ mMutex->unlock();
}
private:
LLMutex* mMutex;