summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorybridge.cpp
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2015-05-06 23:48:28 -0700
committerMerov Linden <merov@lindenlab.com>2015-05-06 23:48:28 -0700
commitcfd4027ba9e9bec0751ec79db114ca6a69223e3f (patch)
treec8b6b9fc929f7b6b97f126fd48f0729fd72c0b9e /indra/newview/llinventorybridge.cpp
parent36ce6fbda5ffe8474129c28ab77090c25967b51b (diff)
parente1aaebd59d7a825440cd51c7f902f0c9f30c3e88 (diff)
Merge
Diffstat (limited to 'indra/newview/llinventorybridge.cpp')
-rwxr-xr-xindra/newview/llinventorybridge.cpp19
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;
}
}
}