diff --git a/indra/newview/llfloaterpathfindingconsole.cpp b/indra/newview/llfloaterpathfindingconsole.cpp index eee5d6860d..37bf937cd1 100644 --- a/indra/newview/llfloaterpathfindingconsole.cpp +++ b/indra/newview/llfloaterpathfindingconsole.cpp @@ -265,7 +265,10 @@ void LLFloaterPathfindingConsole::onClose(bool pIsAppQuitting) mNavMeshZoneSlot.disconnect(); } - //mNavMeshZone.disable(); + if (LLPathingLib::getInstance() != NULL) + { + mNavMeshZone.disable(); + } LLFloater::onClose(pIsAppQuitting); setHeartBeat( false ); 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 ¤tRegionUUID = 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); + } } }