summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2021-01-21 23:13:44 +0200
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2021-01-21 23:18:18 +0200
commitbdedaf58726dd1c2565766fddd5f3795586f4054 (patch)
treeefa5706e4e5b738ca969d67b5b4b85a6509743b9 /indra
parent5629062ce73603e725b4e805a24d807920cd3145 (diff)
SL-14728 Im session without id should be closable
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llfloaterdeleteprefpreset.cpp13
-rw-r--r--indra/newview/llfloaterimsession.cpp1
-rw-r--r--indra/newview/llfloaterloadprefpreset.cpp14
3 files changed, 22 insertions, 6 deletions
diff --git a/indra/newview/llfloaterdeleteprefpreset.cpp b/indra/newview/llfloaterdeleteprefpreset.cpp
index 0765756b43..819b2bcee2 100644
--- a/indra/newview/llfloaterdeleteprefpreset.cpp
+++ b/indra/newview/llfloaterdeleteprefpreset.cpp
@@ -59,8 +59,17 @@ BOOL LLFloaterDeletePrefPreset::postBuild()
void LLFloaterDeletePrefPreset::onOpen(const LLSD& key)
{
mSubdirectory = key.asString();
- std::string floater_title = getString(std::string("title_") + mSubdirectory);
- setTitle(floater_title);
+ std::string title_type = std::string("title_") + mSubdirectory;
+ if (hasString(title_type))
+ {
+ std::string floater_title = getString(title_type);
+ setTitle(floater_title);
+ }
+ else
+ {
+ LL_WARNS() << title_type << " not found" << LL_ENDL;
+ setTitle(title_type);
+ }
LLComboBox* combo = getChild<LLComboBox>("preset_combo");
EDefaultOptions option = DEFAULT_HIDE;
diff --git a/indra/newview/llfloaterimsession.cpp b/indra/newview/llfloaterimsession.cpp
index a4ab1af9a8..48e2b8dc14 100644
--- a/indra/newview/llfloaterimsession.cpp
+++ b/indra/newview/llfloaterimsession.cpp
@@ -160,7 +160,6 @@ void LLFloaterIMSession::onClickCloseBtn(bool)
else
{
LL_WARNS() << "Empty session with id: " << (mSessionID.asString()) << LL_ENDL;
- return;
}
LLFloaterIMSessionTab::onClickCloseBtn();
diff --git a/indra/newview/llfloaterloadprefpreset.cpp b/indra/newview/llfloaterloadprefpreset.cpp
index f89daf3e04..8ed76b1df4 100644
--- a/indra/newview/llfloaterloadprefpreset.cpp
+++ b/indra/newview/llfloaterloadprefpreset.cpp
@@ -58,9 +58,17 @@ BOOL LLFloaterLoadPrefPreset::postBuild()
void LLFloaterLoadPrefPreset::onOpen(const LLSD& key)
{
mSubdirectory = key.asString();
- std::string floater_title = getString(std::string("title_") + mSubdirectory);
-
- setTitle(floater_title);
+ std::string title_type = std::string("title_") + mSubdirectory;
+ if (hasString(title_type))
+ {
+ std::string floater_title = getString(title_type);
+ setTitle(floater_title);
+ }
+ else
+ {
+ LL_WARNS() << title_type << " not found" << LL_ENDL;
+ setTitle(title_type);
+ }
LLComboBox* combo = getChild<LLComboBox>("preset_combo");