diff options
| -rw-r--r-- | indra/newview/llmeshrepository.cpp | 5 | 
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; | 
