Commit f5d4a67b authored by Rye Mutt's avatar Rye Mutt 🍞

Fix crash from failing to lock mesh thread header mutex before accessing map

parent 66349f6e
......@@ -1163,20 +1163,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())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment