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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user