summaryrefslogtreecommitdiff
path: root/indra/newview/llfloateroutbox.cpp
diff options
context:
space:
mode:
authorLeslie Linden <leslie@lindenlab.com>2011-12-12 17:22:47 -0800
committerLeslie Linden <leslie@lindenlab.com>2011-12-12 17:22:47 -0800
commit181eaa8196d19d5d0c1db17fe27bd2bdee11525b (patch)
treeff8110c3deb480c9c200e551ac9f9261be9cbcb1 /indra/newview/llfloateroutbox.cpp
parentd3f06b296203c08c900c4e569ce5df0ac2f27715 (diff)
EXP-1648 FIX
* Merchant outbox no longer crashes for non-merchants. * Folder count is hidden for non-merchants. * Drag and drop to merchant outbox floater is disabled for non-merchants.
Diffstat (limited to 'indra/newview/llfloateroutbox.cpp')
-rw-r--r--indra/newview/llfloateroutbox.cpp38
1 files changed, 23 insertions, 15 deletions
diff --git a/indra/newview/llfloateroutbox.cpp b/indra/newview/llfloateroutbox.cpp
index 972e1e8cdc..b15380d427 100644
--- a/indra/newview/llfloateroutbox.cpp
+++ b/indra/newview/llfloateroutbox.cpp
@@ -269,22 +269,25 @@ void LLFloaterOutbox::updateItemCount()
mOutboxItemCount = item_count;
- switch (mOutboxItemCount)
+ if (mOutboxInventoryPanel)
{
- case 0: mInventoryFolderCountText->setText(getString("OutboxFolderCount0")); break;
- case 1: mInventoryFolderCountText->setText(getString("OutboxFolderCount1")); break;
- default:
+ switch (mOutboxItemCount)
{
- std::string item_count_str = llformat("%d", mOutboxItemCount);
-
- LLStringUtil::format_map_t args;
- args["[NUM]"] = item_count_str;
-
- mInventoryFolderCountText->setText(getString("OutboxFolderCountN", args));
- break;
+ case 0: mInventoryFolderCountText->setText(getString("OutboxFolderCount0")); break;
+ case 1: mInventoryFolderCountText->setText(getString("OutboxFolderCount1")); break;
+ default:
+ {
+ std::string item_count_str = llformat("%d", mOutboxItemCount);
+
+ LLStringUtil::format_map_t args;
+ args["[NUM]"] = item_count_str;
+
+ mInventoryFolderCountText->setText(getString("OutboxFolderCountN", args));
+ break;
+ }
}
}
-
+
mImportButton->setEnabled(mOutboxItemCount > 0);
}
@@ -299,7 +302,11 @@ void LLFloaterOutbox::updateView()
}
else
{
- mOutboxInventoryPanel->setVisible(FALSE);
+ if (mOutboxInventoryPanel)
+ {
+ mOutboxInventoryPanel->setVisible(FALSE);
+ }
+
mInventoryPlaceholder->setVisible(TRUE);
std::string outbox_text;
@@ -335,8 +342,9 @@ BOOL LLFloaterOutbox::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
{
// Pass drag and drop to this floater to the outbox inventory control
- if (LLMarketplaceInventoryImporter::getInstance()->isImportInProgress() ||
- (mWindowShade && mWindowShade->isShown()))
+ if ((mOutboxInventoryPanel == NULL) ||
+ (mWindowShade && mWindowShade->isShown()) ||
+ LLMarketplaceInventoryImporter::getInstance()->isImportInProgress())
{
return FALSE;
}