diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index d5221e4d9a8bc70a2e568f3ae5e737d8c50bc2ac..b908190aa661a72f880ccea81dcd2b7f6a7c92a1 100644 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -1172,20 +1172,26 @@ void LLMeshRepoThread::lockAndLoadMeshLOD(const LLVolumeParams& mesh_params, S32 void LLMeshRepoThread::loadMeshLOD(const LLVolumeParams& mesh_params, S32 lod) { //could be called from any thread - LLMutexLock lock(mMutex); + std::unique_lock<LLMutex> header_lock(*mHeaderMutex); mesh_header_map::iterator iter = mMeshHeader.find(mesh_params.getSculptID()); if (iter != mMeshHeader.end()) { //if we have the header, request LOD byte range + header_lock.unlock(); + LODRequest req(mesh_params, lod); { + LLMutexLock lock(mMutex); mLODReqQ.push(req); LLMeshRepository::sLODProcessing++; } } else { + header_lock.unlock(); + HeaderRequest req(mesh_params); - + + LLMutexLock lock(mMutex); pending_lod_map::iterator pending = mPendingLOD.find(mesh_params); if (pending != mPendingLOD.end())