summaryrefslogtreecommitdiff
path: root/indra/newview/llpathfindingobjectlist.cpp
diff options
context:
space:
mode:
authorTodd Stinson <stinson@lindenlab.com>2012-08-13 16:55:51 -0700
committerTodd Stinson <stinson@lindenlab.com>2012-08-13 16:55:51 -0700
commit7cbbdbd896d1e54d2d54cb4ec1ed5bd14491a629 (patch)
treec41167ff97919de923750a1479a39b4caea5efd5 /indra/newview/llpathfindingobjectlist.cpp
parent1ace064a58daf5bc493ae1fe5a9180db89ea52dc (diff)
PATH-849: CRASHFIX This should fix the crash caused by LLPathfindingObject::handleAvatarNameFetch being called after the corresponding LLPathfindingObject has been deleted.
Diffstat (limited to 'indra/newview/llpathfindingobjectlist.cpp')
-rw-r--r--indra/newview/llpathfindingobjectlist.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/indra/newview/llpathfindingobjectlist.cpp b/indra/newview/llpathfindingobjectlist.cpp
index 68a7e736e6..f1ecb45fc0 100644
--- a/indra/newview/llpathfindingobjectlist.cpp
+++ b/indra/newview/llpathfindingobjectlist.cpp
@@ -45,6 +45,7 @@ LLPathfindingObjectList::LLPathfindingObjectList()
LLPathfindingObjectList::~LLPathfindingObjectList()
{
+ clear();
}
bool LLPathfindingObjectList::isEmpty() const
@@ -52,6 +53,15 @@ bool LLPathfindingObjectList::isEmpty() const
return mObjectMap.empty();
}
+void LLPathfindingObjectList::clear()
+{
+ for (LLPathfindingObjectMap::iterator objectIter = mObjectMap.begin(); objectIter != mObjectMap.end(); ++objectIter)
+ {
+ objectIter->second.reset();
+ }
+ mObjectMap.clear();
+}
+
void LLPathfindingObjectList::update(LLPathfindingObjectPtr pUpdateObjectPtr)
{
if (pUpdateObjectPtr != NULL)