From dace71205f10090996c38400cba82103b976b3aa Mon Sep 17 00:00:00 2001 From: wmayer Date: Mon, 10 Mar 2025 18:02:07 +0100 Subject: [PATCH] App: In ProjectFile::loadDocument() check for parse errors In case a parse error occurred then return with false and do not set the DOMDocument --- src/App/ProjectFile.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/App/ProjectFile.cpp b/src/App/ProjectFile.cpp index 38cc61f582..bf6ec236d9 100644 --- a/src/App/ProjectFile.cpp +++ b/src/App/ProjectFile.cpp @@ -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; }