summaryrefslogtreecommitdiff
path: root/indra/newview/llmeshrepository.cpp
diff options
context:
space:
mode:
authorandreykproductengine <akleshchev@productengine.com>2016-08-01 17:25:20 +0300
committerandreykproductengine <akleshchev@productengine.com>2016-08-01 17:25:20 +0300
commit13f19b1634a4d20c6daed965d52ea412ca4b0455 (patch)
treeda4371f1fa28045193a2e9a06889e2c9c7ffa5ab /indra/newview/llmeshrepository.cpp
parent974e5e58681cb981fae77076dbc443acac24efd3 (diff)
Backed out changeset: c21a7e6d9796
Diffstat (limited to 'indra/newview/llmeshrepository.cpp')
-rw-r--r--indra/newview/llmeshrepository.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index 18634de500..d7665716b7 100644
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
@@ -3906,8 +3906,8 @@ void LLMeshRepository::buildHull(const LLVolumeParams& params, S32 detail)
bool LLMeshRepository::hasPhysicsShape(const LLUUID& mesh_id)
{
- const LLSD* mesh = mThread->getMeshHeader(mesh_id);
- if (mesh && mesh->has("physics_mesh") && (*mesh)["physics_mesh"].has("size") && ((*mesh)["physics_mesh"]["size"].asInteger() > 0))
+ LLSD mesh = mThread->getMeshHeader(mesh_id);
+ if (mesh.has("physics_mesh") && mesh["physics_mesh"].has("size") && (mesh["physics_mesh"]["size"].asInteger() > 0))
{
return true;
}
@@ -3921,26 +3921,27 @@ bool LLMeshRepository::hasPhysicsShape(const LLUUID& mesh_id)
return false;
}
-const LLSD* LLMeshRepository::getMeshHeader(const LLUUID& mesh_id)
+LLSD& LLMeshRepository::getMeshHeader(const LLUUID& mesh_id)
{
LL_RECORD_BLOCK_TIME(FTM_MESH_FETCH);
return mThread->getMeshHeader(mesh_id);
}
-const LLSD* LLMeshRepoThread::getMeshHeader(const LLUUID& mesh_id)
+LLSD& LLMeshRepoThread::getMeshHeader(const LLUUID& mesh_id)
{
+ static LLSD dummy_ret;
if (mesh_id.notNull())
{
LLMutexLock lock(mHeaderMutex);
mesh_header_map::iterator iter = mMeshHeader.find(mesh_id);
if (iter != mMeshHeader.end() && mMeshHeaderSize[mesh_id] > 0)
{
- return &(iter->second);
+ return iter->second;
}
}
- return NULL;
+ return dummy_ret;
}