summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2025-01-20 20:52:28 +0200
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2025-01-20 21:52:51 +0200
commit2ee845c02869b2b3db5810c9ad550efaa46a5289 (patch)
treecee6fefcce69a5f1c9a299923715bfd102892162 /indra
parentebae60c5a7ee99c2b4ad5149b420acb63e44e5d5 (diff)
#3436 Better handling of 'teleport_strings.xml' parsing failure
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llagent.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 26c080bf89..8756baa04a 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -4879,10 +4879,19 @@ void LLAgent::parseTeleportMessages(const std::string& xml_filename)
LLXMLNodePtr root;
bool success = LLUICtrlFactory::getLayeredXMLNode(xml_filename, root);
- if (!success || !root || !root->hasName( "teleport_messages" ))
+ if (!success)
{
+ LLError::LLUserWarningMsg::showMissingFiles();
LL_ERRS() << "Problem reading teleport string XML file: "
- << xml_filename << LL_ENDL;
+ << xml_filename << LL_ENDL;
+ return;
+ }
+
+ if (!root || !root->hasName("teleport_messages"))
+ {
+ LLError::LLUserWarningMsg::showMissingFiles();
+ LL_ERRS() << "Invalid teleport string XML file: "
+ << xml_filename << LL_ENDL;
return;
}