From 0896c1ed035f2719207abf900ff3e7a4ebeb875c Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Wed, 6 Mar 2024 22:46:13 -0500
Subject: [PATCH] Fix broken button callback

---
 indra/llui/llbutton.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp
index 12ca1ac71b1..3a481819a5e 100644
--- a/indra/llui/llbutton.cpp
+++ b/indra/llui/llbutton.cpp
@@ -1293,7 +1293,7 @@ void LLButton::setFloaterToggle(LLUICtrl* ctrl, const LLSD& sdname)
 	// Set the button control value (toggle state) to the floater visibility control (Sets the value as well)
 	button->setControlVariable(LLFloater::getControlGroup()->getControl(vis_control_name));
 	// Set the clicked callback to toggle the floater
-	button->setClickedCallback([](LLUICtrl* ctrl, const LLSD& param) -> void { LLFloaterReg::toggleInstance(param.asStringRef(), LLSD()); });
+	button->setClickedCallback([=](LLUICtrl* ctrl, const LLSD& param) -> void { LLFloaterReg::toggleInstance(sdname.asStringRef(), LLSD()); });
 }
 
 // static
-- 
GitLab