EXT-4088 FIXED (INFRASTRUCTURE) Change LLFolderView::getSelectionList to return a selection

Fixed issue where mCurrentSelectedList was being used before NULL check.
meow-7.2.2
Loren Shih 2010-05-14 11:27:29 -04:00
parent a5f365c331
commit d9f519d55c
1 changed files with 6 additions and 3 deletions

View File

@ -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;
}