summaryrefslogtreecommitdiff
path: root/indra/newview/llpanellandmarks.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2024-07-24 09:33:58 +0300
committerGitHub <noreply@github.com>2024-07-24 09:33:58 +0300
commitf32d3767dc6f0d4d831882135d2eb88ee96ba79d (patch)
tree21685bf5688d93ee583d6f7059fdf5ccb7cea5f2 /indra/newview/llpanellandmarks.cpp
parent25e9c61eef179c7ad79d19261f72c1bc85a3ff1b (diff)
parent57e78ed43b61864a6b8a54df95d8823daaeb5fe8 (diff)
Merge branch 'develop' into marchcat/b-develop
Diffstat (limited to 'indra/newview/llpanellandmarks.cpp')
-rw-r--r--indra/newview/llpanellandmarks.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp
index 99133d1fb3..fb7ccbfe4c 100644
--- a/indra/newview/llpanellandmarks.cpp
+++ b/indra/newview/llpanellandmarks.cpp
@@ -647,10 +647,18 @@ bool LLLandmarksPanel::isActionEnabled(const LLSD& userdata) const
if ("collapse_all" == command_name)
{
+ if (!mCurrentSelectedList)
+ {
+ return false;
+ }
return has_expanded_folders(mCurrentSelectedList->getRootFolder());
}
else if ("expand_all" == command_name)
{
+ if (!mCurrentSelectedList)
+ {
+ return false;
+ }
return has_collapsed_folders(mCurrentSelectedList->getRootFolder());
}
else if ("sort_by_date" == command_name)
@@ -959,12 +967,12 @@ bool LLLandmarksPanel::canItemBeModified(const std::string& command_name, LLFold
// then ask LLFolderView permissions
- LLFolderView* root_folder = mCurrentSelectedList->getRootFolder();
+ LLFolderView* root_folder = mCurrentSelectedList ? mCurrentSelectedList->getRootFolder() : nullptr;
if ("copy" == command_name)
{
// we shouldn't be able to copy folders from My Inventory Panel
- return can_be_modified && root_folder->canCopy();
+ return can_be_modified && root_folder && root_folder->canCopy();
}
else if ("collapse" == command_name)
{
@@ -981,7 +989,7 @@ bool LLLandmarksPanel::canItemBeModified(const std::string& command_name, LLFold
if ("cut" == command_name)
{
- can_be_modified = root_folder->canCut();
+ can_be_modified = root_folder && root_folder->canCut();
}
else if ("rename" == command_name)
{
@@ -993,7 +1001,7 @@ bool LLLandmarksPanel::canItemBeModified(const std::string& command_name, LLFold
}
else if("paste" == command_name)
{
- can_be_modified = root_folder->canPaste();
+ can_be_modified = root_folder && root_folder->canPaste();
}
else
{