From 2ee845c02869b2b3db5810c9ad550efaa46a5289 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Mon, 20 Jan 2025 20:52:28 +0200 Subject: #3436 Better handling of 'teleport_strings.xml' parsing failure --- indra/newview/llagent.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'indra') 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; } -- cgit v1.2.3