diff --git a/indra/newview/llpathfindingmanager.cpp b/indra/newview/llpathfindingmanager.cpp index 16283282fb2b014917759cb5058ef047368172ca..a77d6bcc4c0771e2f06d79d8426fe78d6e0bc9ea 100644 --- a/indra/newview/llpathfindingmanager.cpp +++ b/indra/newview/llpathfindingmanager.cpp @@ -285,10 +285,7 @@ LLPathfindingManager::LLPathfindingManager() mShowNavMeshRebake(false), mCrossingSlot() { - if ( !mCrossingSlot.connected() ) - { - mCrossingSlot = LLEnvManagerNew::getInstance()->setRegionChangeCallback(boost::bind(&LLPathfindingManager::onRegionBoundaryCrossed, this)); - } + } void LLPathfindingManager::onRegionBoundaryCrossed() @@ -616,6 +613,11 @@ LLPathfindingNavMeshPtr LLPathfindingManager::getNavMeshForRegion(LLViewerRegion void LLPathfindingManager::requestGetAgentState() { + if ( !mCrossingSlot.connected() ) + { + mCrossingSlot = LLEnvManagerNew::getInstance()->setRegionChangeCallback(boost::bind(&LLPathfindingManager::onRegionBoundaryCrossed, this)); + } + std::string agentStateURL = getAgentStateURLForCurrentRegion( getCurrentRegion() ); if ( !agentStateURL.empty() )