summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRye Mutt <rye@alchemyviewer.org>2024-07-22 11:00:37 -0400
committerRye Mutt <rye@alchemyviewer.org>2024-07-22 11:00:37 -0400
commitfdc0e14c1ba6e963ca6fd19381d9d1a77599c209 (patch)
treebc973bb5d1d43ddb05fd473ac629838ca880e5b0
parentd609cbaf54498e685315cffc14cfdeb0c139dcf0 (diff)
Fix nullptr crash in LLLandmarksPanel::isActionEnabled
-rw-r--r--indra/newview/llpanellandmarks.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp
index 99133d1fb3..45cfd146be 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)