summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorRye Mutt <rye@alchemyviewer.org>2024-07-22 11:00:58 -0400
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2024-08-09 22:55:08 +0300
commit8de48c426049a4af7f4635fd09ed5976a9087f5e (patch)
tree5db14340fdd7186d8be6eac1229aaad30ae4b951 /indra/newview
parent68316fd0fd776d80934548fbadd90da4d88f954a (diff)
Fix nullptr crash in LLLandmarksPanel::canItemBeModified
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llpanellandmarks.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp
index 99133d1fb3..25631f1e04 100644
--- a/indra/newview/llpanellandmarks.cpp
+++ b/indra/newview/llpanellandmarks.cpp
@@ -959,12 +959,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 +981,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 +993,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
{