From 61fc552c5465a5b26c7d8bc092bc50a76957d505 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Thu, 28 May 2020 21:58:40 +0200 Subject: [PATCH] Fix crash "Failed to find string middle_mouse in panel Media Voice tab loaded from file" when trying to assign the middle mouse button as PTT toggle --- indra/newview/llfloaterpreference.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 53f1ec7ed9..bebfc26c88 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -2818,7 +2818,10 @@ void LLFloaterPreference::setMouse(LLMouseHandler::EClickType click) LLUICtrl* p2t_line_editor = getChild("modifier_combo"); // We are using text control names for readability and compatibility with voice p2t_line_editor->setControlValue(ctrl_value); - LLPanel* advanced_preferences = dynamic_cast(p2t_line_editor->getParent()); + // Fix crash "Failed to find string middle_mouse in panel Media Voice tab loaded from file" + //LLPanel* advanced_preferences = dynamic_cast(p2t_line_editor->getParent()); + LLPanel* advanced_preferences = dynamic_cast(p2t_line_editor->getParent()->getParent()->getParent()); + // if (advanced_preferences) { p2t_line_editor->setValue(advanced_preferences->getString(bt_name));