FIRE-7182, make sure only one thread access mPendingLOD at the same time.

Nicky 2012-08-14 19:57:43 +02:00
parent f10dd52667
commit 9b7f5d2cc5
1 changed files with 4 additions and 1 deletions

View File

@ -1185,11 +1185,14 @@ bool LLMeshRepoThread::headerReceived(const LLVolumeParams& mesh_params, U8* dat
mMeshHeader[mesh_id] = header;
}
LLMutexLock lock(mMutex); // <FS:ND/> FIRE-7182, make sure only one thread access mPendingLOD at the same time.
//check for pending requests
pending_lod_map::iterator iter = mPendingLOD.find(mesh_params);
if (iter != mPendingLOD.end())
{
LLMutexLock lock(mMutex);
// LLMutexLock lock(mMutex); <FS:ND/> FIRE-7182, lock was moved up, before calling mPendingLOD.find
for (U32 i = 0; i < iter->second.size(); ++i)
{
LODRequest req(mesh_params, iter->second[i]);