diff options
author | Merov Linden <merov@lindenlab.com> | 2015-05-02 14:16:26 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2015-05-02 14:16:26 -0700 |
commit | 7da083e3e64dcd4e851e7ac6539e26e60cf82203 (patch) | |
tree | 032571f27b3a00a66fbbb6dc2da5356cae021e3e /indra | |
parent | 3748d2f6dcde6f26c591c544c674aa76a81544c1 (diff) |
DD-394 : Make sure Copy and Move to Marketplace menu items are disabled if the Marketplace listing folder doesn't exist
Diffstat (limited to 'indra')
-rwxr-xr-x | indra/newview/llinventorybridge.cpp | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index eedaa82c81..3fb047c68a 100755 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -1490,16 +1490,23 @@ bool LLInvFVBridge::canListOnMarketplaceNow() const std::string error_msg; LLInventoryModel* model = getInventoryModel(); const LLUUID &marketplacelistings_id = model->findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS, false); - LLViewerInventoryCategory * master_folder = model->getCategory(marketplacelistings_id); - LLInventoryCategory *cat = model->getCategory(mUUID); - if (cat) + if (marketplacelistings_id.notNull()) { - can_list = can_move_folder_to_marketplace(master_folder, master_folder, cat, error_msg); + LLViewerInventoryCategory * master_folder = model->getCategory(marketplacelistings_id); + LLInventoryCategory *cat = model->getCategory(mUUID); + if (cat) + { + can_list = can_move_folder_to_marketplace(master_folder, master_folder, cat, error_msg); + } + else + { + LLInventoryItem *item = model->getItem(mUUID); + can_list = (item ? can_move_item_to_marketplace(master_folder, master_folder, item, error_msg) : false); + } } else { - LLInventoryItem *item = model->getItem(mUUID); - can_list = (item ? can_move_item_to_marketplace(master_folder, master_folder, item, error_msg) : false); + can_list = false; } } } |