diff options
| author | Todd Stinson <stinson@lindenlab.com> | 2012-03-07 14:39:27 -0800 | 
|---|---|---|
| committer | Todd Stinson <stinson@lindenlab.com> | 2012-03-07 14:39:27 -0800 | 
| commit | a7944f17bec66e7c0f066ab3b6196cc2233b1ca7 (patch) | |
| tree | 22171ae658b61fb4d65f0a6899768a8df4091116 | |
| parent | 94dbe51a5c6fa09989f9e71ee8d84a7207b8acc5 (diff) | |
PATH-205,PATh-304: Fixing a crash issue with loading multiple navmeshes during the second refresh.
| -rw-r--r-- | indra/newview/llfloaterpathfindingconsole.cpp | 4 | ||||
| -rw-r--r-- | indra/newview/llpathfindingnavmeshzone.cpp | 24 | 
2 files changed, 12 insertions, 16 deletions
| diff --git a/indra/newview/llfloaterpathfindingconsole.cpp b/indra/newview/llfloaterpathfindingconsole.cpp index fe5c6b8d44..6824e629c9 100644 --- a/indra/newview/llfloaterpathfindingconsole.cpp +++ b/indra/newview/llfloaterpathfindingconsole.cpp @@ -613,6 +613,9 @@ void LLFloaterPathfindingConsole::onNavMeshZoneCB(LLPathfindingNavMeshZone::ENav  {
  	switch (pNavMeshZoneRequestStatus)
  	{
 +	case LLPathfindingNavMeshZone::kNavMeshZoneRequestUnknown :
 +		setConsoleState(kConsoleStateUnknown);
 +		break;
  	case LLPathfindingNavMeshZone::kNavMeshZoneRequestStarted :
  		setConsoleState(kConsoleStateDownloading);
  		break;
 @@ -625,7 +628,6 @@ void LLFloaterPathfindingConsole::onNavMeshZoneCB(LLPathfindingNavMeshZone::ENav  	case LLPathfindingNavMeshZone::kNavMeshZoneRequestError :
  		setConsoleState(kConsoleStateError);
  		break;
 -	case LLPathfindingNavMeshZone::kNavMeshZoneRequestUnknown :
  	default:
  		setConsoleState(kConsoleStateUnknown);
  		llassert(0);
 diff --git a/indra/newview/llpathfindingnavmeshzone.cpp b/indra/newview/llpathfindingnavmeshzone.cpp index 7b9ac913c9..983b88fe05 100644 --- a/indra/newview/llpathfindingnavmeshzone.cpp +++ b/indra/newview/llpathfindingnavmeshzone.cpp @@ -65,11 +65,6 @@ LLPathfindingNavMeshZone::navmesh_zone_slot_t LLPathfindingNavMeshZone::register  void LLPathfindingNavMeshZone::initialize()
  {
 -	llassert(LLPathingLib::getInstance() != NULL);
 -	if (LLPathingLib::getInstance() != NULL)
 -	{
 -		LLPathingLib::getInstance()->cleanupResidual();
 -	}
  	mNavMeshLocationPtrs.clear();
  	NavMeshLocationPtr centerNavMeshPtr(new NavMeshLocation(CENTER_REGION, boost::bind(&LLPathfindingNavMeshZone::handleNavMeshLocation, this)));
 @@ -101,17 +96,16 @@ void LLPathfindingNavMeshZone::disable()  		NavMeshLocationPtr navMeshLocationPtr = *navMeshLocationPtrIter;
  		navMeshLocationPtr->disable();
  	}
 -#if 0
 +}
 +
 +void LLPathfindingNavMeshZone::refresh()
 +{
  	llassert(LLPathingLib::getInstance() != NULL);
  	if (LLPathingLib::getInstance() != NULL)
  	{
  		LLPathingLib::getInstance()->cleanupResidual();
  	}
 -#endif
 -}
 -void LLPathfindingNavMeshZone::refresh()
 -{
  	for (NavMeshLocationPtrs::iterator navMeshLocationPtrIter = mNavMeshLocationPtrs.begin();
  		navMeshLocationPtrIter != mNavMeshLocationPtrs.end(); ++navMeshLocationPtrIter)
  	{
 @@ -170,6 +164,10 @@ void LLPathfindingNavMeshZone::updateStatus()  	{
  		zoneRequestStatus = kNavMeshZoneRequestError;
  	}
 +	else if (hasRequestUnknown)
 +	{
 +		zoneRequestStatus = kNavMeshZoneRequestUnknown;
 +	}
  	else if (hasRequestCompleted)
  	{
  		zoneRequestStatus = kNavMeshZoneRequestCompleted;
 @@ -183,10 +181,6 @@ void LLPathfindingNavMeshZone::updateStatus()  	{
  		zoneRequestStatus = kNavMeshZoneRequestNotEnabled;
  	}
 -	else if (hasRequestUnknown)
 -	{
 -		zoneRequestStatus = kNavMeshZoneRequestUnknown;
 -	}
  	else
  	{
  		zoneRequestStatus = kNavMeshZoneRequestError;
 @@ -239,7 +233,7 @@ void LLPathfindingNavMeshZone::NavMeshLocation::refresh()  	{
  		llassert(mRegionUUID.isNull());
  		LLSD::Binary nullData;
 -		handleNavMesh(LLPathfindingNavMesh::kNavMeshRequestUnknown, mRegionUUID, 0U, nullData);
 +		handleNavMesh(LLPathfindingNavMesh::kNavMeshRequestNotEnabled, mRegionUUID, 0U, nullData);
  	}
  	else
  	{
 | 
