From 9b31bd9ad6978f0c7c05378f7d0f64b07a727db9 Mon Sep 17 00:00:00 2001 From: Siana Gearz Date: Fri, 31 May 2013 10:54:17 +0200 Subject: [PATCH] Fix inventory move logic --- indra/newview/llinventorymodel.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index f854e8607..fdcfac11c 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -1062,14 +1062,13 @@ void LLInventoryModel::moveObject(const LLUUID& object_id, const LLUUID& cat_id) return; } - cat_map_t::iterator it; - if((object_id == cat_id) || (it = mCategoryMap.find(cat_id))==mCategoryMap.end()) + if((object_id == cat_id) || !is_in_map(mCategoryMap, cat_id)) { llwarns << "Could not move inventory object " << object_id << " to " << cat_id << llendl; return; } - LLViewerInventoryCategory* cat = it->second; + LLViewerInventoryCategory* cat = getCategory(object_id); if(cat && (cat->getParentUUID() != cat_id)) { cat_array_t* cat_array;