diff options
author | Rye Mutt <rye@alchemyviewer.org> | 2024-07-22 11:00:58 -0400 |
---|---|---|
committer | Rye Mutt <rye@alchemyviewer.org> | 2024-07-22 11:00:58 -0400 |
commit | 177a21d072e05dd28a09368e3b235d362b258f9e (patch) | |
tree | 237b1d409b2c937e3b5613b017f0b389d9a7c62d /indra/newview/llpanellandmarks.cpp | |
parent | fdc0e14c1ba6e963ca6fd19381d9d1a77599c209 (diff) |
Fix nullptr crash in LLLandmarksPanel::canItemBeModified
Diffstat (limited to 'indra/newview/llpanellandmarks.cpp')
-rw-r--r-- | indra/newview/llpanellandmarks.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index 45cfd146be..fb7ccbfe4c 100644 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -967,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) { @@ -989,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) { @@ -1001,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 { |