summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorandreykproductengine <akleshchev@productengine.com>2016-08-01 18:58:41 +0300
committerandreykproductengine <akleshchev@productengine.com>2016-08-01 18:58:41 +0300
commitce3658455230cf392f45cc99f44a737ee59f13bd (patch)
treec0c7371d494cc2ce07a4ff0905d11481551ca28f /indra
parent9b07078b470d40c4b6454d21da2909c35517b248 (diff)
MAINT-6460 getMeshSize crash
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llmeshrepository.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index 8bc75c8433..54f8fb93d0 100644
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
@@ -3956,10 +3956,11 @@ void LLMeshRepository::uploadModel(std::vector<LLModelInstance>& data, LLVector3
S32 LLMeshRepository::getMeshSize(const LLUUID& mesh_id, S32 lod)
{
- if (mThread)
+ if (mThread && mesh_id.notNull())
{
+ LLMutexLock lock(mThread->mHeaderMutex);
LLMeshRepoThread::mesh_header_map::iterator iter = mThread->mMeshHeader.find(mesh_id);
- if (iter != mThread->mMeshHeader.end())
+ if (iter != mThread->mMeshHeader.end() && mThread->mMeshHeaderSize[mesh_id] > 0)
{
LLSD& header = iter->second;