Bugfix: prevent crash with current source when reordering

This commit is contained in:
brunoherbelin
2021-03-21 13:24:54 +01:00
parent 5f800f3723
commit 28d4d4acc4
6 changed files with 64 additions and 43 deletions

View File

@@ -237,12 +237,13 @@ bool tinyxml2::XMLSaveDoc(XMLDocument * const doc, std::string filename)
return !XMLResultError(eResult);
}
bool tinyxml2::XMLResultError(int result)
bool tinyxml2::XMLResultError(int result, bool verbose)
{
XMLError xmlresult = (XMLError) result;
if ( xmlresult != XML_SUCCESS)
{
Log::Info("XML error %i: %s", result, tinyxml2::XMLDocument::ErrorIDToName(xmlresult));
if (verbose)
Log::Info("XML error %i: %s", result, tinyxml2::XMLDocument::ErrorIDToName(xmlresult));
return true;
}
return false;