summaryrefslogtreecommitdiff
path: root/indra/newview/llmeshrepository.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llmeshrepository.cpp')
-rwxr-xr-xindra/newview/llmeshrepository.cpp35
1 files changed, 33 insertions, 2 deletions
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index 5a29bb9e7b..09003e3e53 100755
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
@@ -1197,11 +1197,13 @@ bool LLMeshRepoThread::headerReceived(const LLVolumeParams& mesh_params, U8* dat
mMeshHeader[mesh_id] = header;
}
+
+ LLMutexLock lock(mMutex); // 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);
for (U32 i = 0; i < iter->second.size(); ++i)
{
LODRequest req(mesh_params, iter->second[i]);
@@ -1896,7 +1898,13 @@ void LLMeshLODResponder::completedRaw(U32 status, const std::string& reason,
const LLIOPipe::buffer_ptr_t& buffer)
{
mProcessed = true;
-
+
+ // thread could have already be destroyed during logout
+ if( !gMeshRepo.mThread )
+ {
+ return;
+ }
+
S32 data_size = buffer->countAfter(channels.in(), NULL);
if (status < 200 || status > 400)
@@ -1955,6 +1963,12 @@ void LLMeshSkinInfoResponder::completedRaw(U32 status, const std::string& reason
{
mProcessed = true;
+ // thread could have already be destroyed during logout
+ if( !gMeshRepo.mThread )
+ {
+ return;
+ }
+
S32 data_size = buffer->countAfter(channels.in(), NULL);
if (status < 200 || status > 400)
@@ -2012,6 +2026,11 @@ void LLMeshDecompositionResponder::completedRaw(U32 status, const std::string& r
const LLIOPipe::buffer_ptr_t& buffer)
{
mProcessed = true;
+
+ if( !gMeshRepo.mThread )
+ {
+ return;
+ }
S32 data_size = buffer->countAfter(channels.in(), NULL);
@@ -2071,6 +2090,12 @@ void LLMeshPhysicsShapeResponder::completedRaw(U32 status, const std::string& re
{
mProcessed = true;
+ // thread could have already be destroyed during logout
+ if( !gMeshRepo.mThread )
+ {
+ return;
+ }
+
S32 data_size = buffer->countAfter(channels.in(), NULL);
if (status < 200 || status > 400)
@@ -2129,6 +2154,12 @@ void LLMeshHeaderResponder::completedRaw(U32 status, const std::string& reason,
{
mProcessed = true;
+ // thread could have already be destroyed during logout
+ if( !gMeshRepo.mThread )
+ {
+ return;
+ }
+
if (status < 200 || status > 400)
{
//llwarns