From 6f4a21531ae7e5d095034f7315501421dd94d124 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Thu, 21 Oct 2010 17:12:24 -0700 Subject: STORM-173 : never enable return object if no object selected --- indra/newview/llviewermenu.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index ccf3df827d..dc7c6f17a9 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -4160,6 +4160,12 @@ class LLObjectEnableReturn : public view_listener_t { bool handleEvent(const LLSD& userdata) { + LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstRootNode(); + if (!node) + { + // Do not enable if nothing selected + return false; + } #ifdef HACKED_GODLIKE_VIEWER bool new_value = true; #else -- cgit v1.2.3