diff options
author | Rider Linden <rider@lindenlab.com> | 2016-03-02 11:28:55 -0800 |
---|---|---|
committer | Rider Linden <rider@lindenlab.com> | 2016-03-02 11:28:55 -0800 |
commit | 52517126399a07839c9b78faed90dc7c09285329 (patch) | |
tree | ba21b223092ee1c9483d3085dd52cc2dc07f7f5e /indra | |
parent | 919a11031bc29a86c8a0ebde8e2a315fd7b3abdf (diff) |
MAINT-6182: When building the list of pathfinding characters throw away any entries that are undefined.
Diffstat (limited to 'indra')
-rwxr-xr-x | indra/newview/llpathfindingcharacterlist.cpp | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/indra/newview/llpathfindingcharacterlist.cpp b/indra/newview/llpathfindingcharacterlist.cpp index 12340cebfa..d63daaa59b 100755 --- a/indra/newview/llpathfindingcharacterlist.cpp +++ b/indra/newview/llpathfindingcharacterlist.cpp @@ -40,14 +40,14 @@ //--------------------------------------------------------------------------- LLPathfindingCharacterList::LLPathfindingCharacterList() - : LLPathfindingObjectList() + : LLPathfindingObjectList() { } LLPathfindingCharacterList::LLPathfindingCharacterList(const LLSD& pCharacterListData) - : LLPathfindingObjectList() + : LLPathfindingObjectList() { - parseCharacterListData(pCharacterListData); + parseCharacterListData(pCharacterListData); } LLPathfindingCharacterList::~LLPathfindingCharacterList() @@ -56,14 +56,16 @@ LLPathfindingCharacterList::~LLPathfindingCharacterList() void LLPathfindingCharacterList::parseCharacterListData(const LLSD& pCharacterListData) { - LLPathfindingObjectMap &objectMap = getObjectMap(); + LLPathfindingObjectMap &objectMap = getObjectMap(); - for (LLSD::map_const_iterator characterDataIter = pCharacterListData.beginMap(); - characterDataIter != pCharacterListData.endMap(); ++characterDataIter) - { - const std::string& uuid(characterDataIter->first); - const LLSD& characterData = characterDataIter->second; - LLPathfindingObjectPtr character(new LLPathfindingCharacter(uuid, characterData)); - objectMap.insert(std::pair<std::string, LLPathfindingObjectPtr>(uuid, character)); - } + for (LLSD::map_const_iterator characterDataIter = pCharacterListData.beginMap(); + characterDataIter != pCharacterListData.endMap(); ++characterDataIter) + { + if (characterDataIter->second.isUndefined()) + continue; + const std::string& uuid(characterDataIter->first); + const LLSD& characterData = characterDataIter->second; + LLPathfindingObjectPtr character(new LLPathfindingCharacter(uuid, characterData)); + objectMap.insert(std::pair<std::string, LLPathfindingObjectPtr>(uuid, character)); + } } |