diff options
author | Oz Linden <oz@lindenlab.com> | 2016-03-16 13:08:06 -0400 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2016-03-16 13:08:06 -0400 |
commit | 31f3db02919870a8e92c9452de477c1478b273e9 (patch) | |
tree | 1acf6944bf8dbe0b67bb64caee9188ad5e36d913 /indra/newview/llaisapi.cpp | |
parent | 0b996159cef3a4022c6a3d4691bd2e2db37b6e92 (diff) | |
parent | 9197a8652e49178c63ea208c6c4acf1ca3433659 (diff) |
merge changes for DRTVWR-417
Diffstat (limited to 'indra/newview/llaisapi.cpp')
-rw-r--r-- | indra/newview/llaisapi.cpp | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/indra/newview/llaisapi.cpp b/indra/newview/llaisapi.cpp index 714b456ae7..d8b6cc729d 100644 --- a/indra/newview/llaisapi.cpp +++ b/indra/newview/llaisapi.cpp @@ -567,13 +567,25 @@ void AISUpdate::parseCategory(const LLSD& category_map) parseDescendentCount(category_id, category_map["_embedded"]); } - LLPointer<LLViewerInventoryCategory> new_cat(new LLViewerInventoryCategory(category_id)); + LLPointer<LLViewerInventoryCategory> new_cat; LLViewerInventoryCategory *curr_cat = gInventory.getCategory(category_id); if (curr_cat) { // Default to current values where not provided. - new_cat->copyViewerCategory(curr_cat); - } + new_cat = new LLViewerInventoryCategory(curr_cat); + } + else + { + if (category_map.has("agent_id")) + { + new_cat = new LLViewerInventoryCategory(category_map["agent_id"].asUUID()); + } + else + { + LL_DEBUGS() << "No owner provided, folder might be assigned wrong owner" << LL_ENDL; + new_cat = new LLViewerInventoryCategory(LLUUID::null); + } + } BOOL rv = new_cat->unpackMessage(category_map); // *NOTE: unpackMessage does not unpack version or descendent count. //if (category_map.has("version")) |