App: In ProjectFile::loadDocument() check for parse errors

In case a parse error occurred then return with false and do not set the DOMDocument
This commit is contained in:
wmayer
2025-03-10 18:02:07 +01:00
committed by Ladislav Michl
parent 56e687d9cc
commit dace71205f

View File

@@ -243,6 +243,9 @@ bool ProjectFile::loadDocument()
try {
Base::StdInputSource inputSource(*str, stdFile.c_str());
parser->parse(inputSource);
if (parser->getErrorCount() > 0) {
return false;
}
xmlDocument = parser->adoptDocument();
return true;
}