summaryrefslogtreecommitdiff
path: root/indra/newview/llpathfindingnavmeshzone.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpathfindingnavmeshzone.cpp')
-rw-r--r--indra/newview/llpathfindingnavmeshzone.cpp23
1 files changed, 18 insertions, 5 deletions
diff --git a/indra/newview/llpathfindingnavmeshzone.cpp b/indra/newview/llpathfindingnavmeshzone.cpp
index 986acfa3e8..8fa6fc3c8b 100644
--- a/indra/newview/llpathfindingnavmeshzone.cpp
+++ b/indra/newview/llpathfindingnavmeshzone.cpp
@@ -65,7 +65,10 @@ LLPathfindingNavMeshZone::navmesh_zone_slot_t LLPathfindingNavMeshZone::register
void LLPathfindingNavMeshZone::setCurrentRegionAsCenter()
{
llassert(LLPathingLib::getInstance() != NULL);
- LLPathingLib::getInstance()->cleanupResidual();
+ if (LLPathingLib::getInstance() != NULL)
+ {
+ LLPathingLib::getInstance()->cleanupResidual();
+ }
mNavMeshLocations.clear();
LLViewerRegion *currentRegion = gAgent.getRegion();
const LLUUID &currentRegionUUID = currentRegion->getRegionID();
@@ -91,8 +94,10 @@ void LLPathfindingNavMeshZone::disable()
mNavMeshSlot.disconnect();
}
- llassert(LLPathingLib::getInstance() != NULL);
- LLPathingLib::getInstance()->cleanupResidual();
+ if (LLPathingLib::getInstance() != NULL)
+ {
+ LLPathingLib::getInstance()->cleanupResidual();
+ }
mNavMeshLocations.clear();
}
@@ -163,7 +168,11 @@ void LLPathfindingNavMeshZone::updateStatus()
else if (hasRequestCompleted)
{
zoneRequestStatus = kNavMeshZoneRequestCompleted;
- LLPathingLib::getInstance()->stitchNavMeshes( gSavedSettings.getBOOL("EnableVBOForNavMeshVisualization") );
+ llassert(LLPathingLib::getInstance() != NULL);
+ if (LLPathingLib::getInstance() != NULL)
+ {
+ LLPathingLib::getInstance()->stitchNavMeshes( gSavedSettings.getBOOL("EnableVBOForNavMeshVisualization") );
+ }
}
else
{
@@ -209,7 +218,11 @@ void LLPathfindingNavMeshZone::NavMeshLocation::handleNavMesh(LLPathfindingNavMe
llassert(!pNavMeshData.empty());
mHasNavMesh = true;
mNavMeshVersion = pNavMeshVersion;
- LLPathingLib::getInstance()->extractNavMeshSrcFromLLSD(pNavMeshData, mDirection);
+ llassert(LLPathingLib::getInstance() != NULL);
+ if (LLPathingLib::getInstance() != NULL)
+ {
+ LLPathingLib::getInstance()->extractNavMeshSrcFromLLSD(pNavMeshData, mDirection);
+ }
}
}