From d9f519d55c4b5cff0fa56d2130a7e25a144be9ff Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Fri, 14 May 2010 11:27:29 -0400 Subject: EXT-4088 FIXED (INFRASTRUCTURE) Change LLFolderView::getSelectionList to return a selection Fixed issue where mCurrentSelectedList was being used before NULL check. --- indra/newview/llpanellandmarks.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'indra/newview/llpanellandmarks.cpp') diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index 6634bc948d..4bf4f9eac1 100644 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -993,10 +993,13 @@ bool LLLandmarksPanel::isActionEnabled(const LLSD& userdata) const } else if("create_pick" == command_name) { - std::set selection = mCurrentSelectedList->getRootFolder()->getSelectionList(); - if ( mCurrentSelectedList && !selection.empty() ) + if (mCurrentSelectedList) { - return ( 1 == selection.size() && !LLAgentPicksInfo::getInstance()->isPickLimitReached() ); + std::set selection = mCurrentSelectedList->getRootFolder()->getSelectionList(); + if (!selection.empty()) + { + return ( 1 == selection.size() && !LLAgentPicksInfo::getInstance()->isPickLimitReached() ); + } } return false; } -- cgit v1.2.3