diff options
author | Oz Linden <oz@lindenlab.com> | 2013-05-08 14:46:00 -0400 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2013-05-08 14:46:00 -0400 |
commit | 1b984d8f40d805341b8c1fc670c29b32c25ce227 (patch) | |
tree | fb73a6224dfe7ff7d5bf4619a799b0ededffcb64 /indra/newview/llviewerobject.cpp | |
parent | 21ba1e9c1e8afeb1b3cf67462f6e16ff8f6ae91a (diff) | |
parent | 1beb15c93b139e4494bb90cce30b1c67accb4b08 (diff) |
merge changes for 3.5.1-release
Diffstat (limited to 'indra/newview/llviewerobject.cpp')
-rw-r--r-- | indra/newview/llviewerobject.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index c020ee36d3..96e701a6cb 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -2700,25 +2700,25 @@ void LLViewerObject::processTaskInvFile(void** user_data, S32 error_code, LLExtS if (object->loadTaskInvFile(ft->mFilename)) { - LLInventoryObject::object_list_t::iterator it = object->mInventory->begin(); - LLInventoryObject::object_list_t::iterator end = object->mInventory->end(); - std::list<LLUUID>& pending_lst = object->mPendingInventoryItemsIDs; + LLInventoryObject::object_list_t::iterator it = object->mInventory->begin(); + LLInventoryObject::object_list_t::iterator end = object->mInventory->end(); + std::list<LLUUID>& pending_lst = object->mPendingInventoryItemsIDs; - for (; it != end && pending_lst.size(); ++it) - { - LLViewerInventoryItem* item = dynamic_cast<LLViewerInventoryItem*>(it->get()); - if(item && item->getType() != LLAssetType::AT_CATEGORY) + for (; it != end && pending_lst.size(); ++it) { - std::list<LLUUID>::iterator id_it = std::find(pending_lst.begin(), pending_lst.begin(), item->getAssetUUID()); - if (id_it != pending_lst.end()) + LLViewerInventoryItem* item = dynamic_cast<LLViewerInventoryItem*>(it->get()); + if(item && item->getType() != LLAssetType::AT_CATEGORY) { - pending_lst.erase(id_it); + std::list<LLUUID>::iterator id_it = std::find(pending_lst.begin(), pending_lst.begin(), item->getAssetUUID()); + if (id_it != pending_lst.end()) + { + pending_lst.erase(id_it); + } } } } - } - else - { + else + { // MAINT-2597 - crash when trying to edit a no-mod object // Somehow get an contents inventory response, but with an invalid stream (possibly 0 size?) // Stated repro was specific to no-mod objects so failing without user interaction should be safe. |