Skip to content

Commit 0894784

Browse files
committed
Prevent the creation of temporary objects that will be discarded.
1 parent ae659ad commit 0894784

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

indra/newview/llpathfindingnavmesh.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,8 @@ void LLPathfindingNavMesh::handleNavMeshResult(const LLSD &pContent, U32 pNavMes
139139
ENavMeshRequestStatus status;
140140
if ( pContent.has(NAVMESH_DATA_FIELD) )
141141
{
142-
const LLSD::Binary &value = pContent.get(NAVMESH_DATA_FIELD).asBinary();
142+
LLSD nav_data = pContent.get(NAVMESH_DATA_FIELD);
143+
const LLSD::Binary& value = nav_data.asBinary();
143144
auto binSize = value.size();
144145
std::string newStr(reinterpret_cast<const char *>(&value[0]), binSize);
145146
std::istringstream streamdecomp( newStr );

0 commit comments

Comments
 (0)