From 86056788ec8a5af023c6b8d7d0809597bc1012f0 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Sat, 13 Feb 2010 13:35:53 +0000 Subject: CID-134 Checker: NULL_RETURNS Function: LLToolsEnableUnlink::handleEvent(const LLSD &) File: /indra/newview/llviewermenu.cpp --- indra/newview/llviewermenu.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'indra/newview') 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; } }; -- cgit v1.2.3