summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermenu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r--indra/newview/llviewermenu.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index b15a9a9e99..8c61ba7558 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -4842,9 +4842,10 @@ class LLToolsEnableUnlink : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
+ LLViewerObject* first_editable_object = LLSelectMgr::getInstance()->getSelection()->getFirstEditableObject();
bool new_value = LLSelectMgr::getInstance()->selectGetAllRootsValid() &&
- LLSelectMgr::getInstance()->getSelection()->getFirstEditableObject() &&
- !LLSelectMgr::getInstance()->getSelection()->getFirstEditableObject()->isAttachment();
+ first_editable_object &&
+ !first_editable_object->isAttachment();
return new_value;
}
};