From 2f81ce5cbdea05efe98a81c02c7d0ab775b5d9f1 Mon Sep 17 00:00:00 2001
From: Mnikolenko Productengine <mnikolenko@productengine.com>
Date: Wed, 7 Sep 2022 17:08:24 +0300
Subject: [PATCH] SL-18100 FIXED Chat log disappears if translation service is
 turned on at splash screen

---
 indra/newview/llfloatertranslationsettings.cpp | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/indra/newview/llfloatertranslationsettings.cpp b/indra/newview/llfloatertranslationsettings.cpp
index b1316e386df..8bf48a811aa 100644
--- a/indra/newview/llfloatertranslationsettings.cpp
+++ b/indra/newview/llfloatertranslationsettings.cpp
@@ -289,7 +289,10 @@ void LLFloaterTranslationSettings::onBtnOK()
 	gSavedSettings.setString("TranslationService", getSelectedService());
 	gSavedSettings.setString("BingTranslateAPIKey", getEnteredBingKey());
 	gSavedSettings.setString("GoogleTranslateAPIKey", getEnteredGoogleKey());
-	(LLFloaterReg::getTypedInstance<LLFloaterIMNearbyChat>("nearby_chat"))->
-			showTranslationCheckbox(LLTranslate::isTranslationConfigured());
+	LLFloaterIMNearbyChat* nearby_chat = LLFloaterReg::findTypedInstance<LLFloaterIMNearbyChat>("nearby_chat");
+	if (nearby_chat)
+	{
+		nearby_chat->showTranslationCheckbox(LLTranslate::isTranslationConfigured());
+	}
 	closeFloater(false);
 }
-- 
GitLab