From d9f519d55c4b5cff0fa56d2130a7e25a144be9ff Mon Sep 17 00:00:00 2001
From: Loren Shih <seraph@lindenlab.com>
Date: Fri, 14 May 2010 11:27:29 -0400
Subject: [PATCH] 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(-)

diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp
index 6634bc948d4..4bf4f9eac12 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<LLUUID> selection = mCurrentSelectedList->getRootFolder()->getSelectionList();
-		if ( mCurrentSelectedList && !selection.empty() )
+		if (mCurrentSelectedList)
 		{
-			return ( 1 == selection.size() && !LLAgentPicksInfo::getInstance()->isPickLimitReached() );
+			std::set<LLUUID> selection = mCurrentSelectedList->getRootFolder()->getSelectionList();
+			if (!selection.empty())
+			{
+				return ( 1 == selection.size() && !LLAgentPicksInfo::getInstance()->isPickLimitReached() );
+			}
 		}
 		return false;
 	}
-- 
GitLab