summaryrefslogtreecommitdiff
path: root/indra/newview/llpanellandmarks.cpp
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2010-05-14 11:27:29 -0400
committerLoren Shih <seraph@lindenlab.com>2010-05-14 11:27:29 -0400
commitd9f519d55c4b5cff0fa56d2130a7e25a144be9ff (patch)
tree74506a2da8c1321235fbfe893ed1237cd4817979 /indra/newview/llpanellandmarks.cpp
parenta5f365c331149b03366be421aa1597dfbcb1bb33 (diff)
EXT-4088 FIXED (INFRASTRUCTURE) Change LLFolderView::getSelectionList to return a selection
Fixed issue where mCurrentSelectedList was being used before NULL check.
Diffstat (limited to 'indra/newview/llpanellandmarks.cpp')
-rw-r--r--indra/newview/llpanellandmarks.cpp9
1 files changed, 6 insertions, 3 deletions
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<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;
}