summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormaxim_productengine <mnikolenko@productengine.com>2018-03-06 11:32:28 +0200
committermaxim_productengine <mnikolenko@productengine.com>2018-03-06 11:32:28 +0200
commit8617e974272c71c768942e8e25e7e1761c003fb9 (patch)
tree59f957af46100b013ce924d87e1c22cf80aee88f
parentff4bf1a00e4acdb7391d5563c2079e8c43e41493 (diff)
MAINT-8342 FIXED [maint-viewer] Viewer crash when click Take off in Temporary attachments
-rw-r--r--indra/newview/llpanelwearing.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/indra/newview/llpanelwearing.cpp b/indra/newview/llpanelwearing.cpp
index 75c8765c5b..89cb495db9 100644
--- a/indra/newview/llpanelwearing.cpp
+++ b/indra/newview/llpanelwearing.cpp
@@ -342,7 +342,11 @@ bool LLPanelWearing::isActionEnabled(const LLSD& userdata)
}
else
{
- return mTempItemsList->hasSelectedItem();
+ LLScrollListItem* item = mTempItemsList->getFirstSelected();
+ if (item && item->getUUID().notNull())
+ {
+ return true;
+ }
}
}
@@ -524,7 +528,7 @@ void LLPanelWearing::onEditAttachment()
void LLPanelWearing::onRemoveAttachment()
{
LLScrollListItem* item = mTempItemsList->getFirstSelected();
- if (item)
+ if (item && item->getUUID().notNull())
{
LLSelectMgr::getInstance()->deselectAll();
LLSelectMgr::getInstance()->selectObjectAndFamily(mAttachmentsMap[item->getUUID()]);