Skip to content

Commit 6f13778

Browse files
committed
Add explicit check for LoadFile success
1 parent c49d8fc commit 6f13778

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/analyzerinfo.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,8 @@ bool AnalyzerInformation::analyzeFile(const std::string &buildDir, const std::st
153153
mAnalyzerInfoFile = AnalyzerInformation::getAnalyzerInfoFile(buildDir,sourcefile,cfg,fileIndex);
154154

155155
tinyxml2::XMLDocument analyzerInfoDoc;
156-
analyzerInfoDoc.LoadFile(mAnalyzerInfoFile.c_str());
156+
if (analyzerInfoDoc.LoadFile(mAnalyzerInfoFile.c_str()) != tinyxml2::XML_SUCCESS)
157+
return true;
157158

158159
if (skipAnalysis(analyzerInfoDoc, hash, errors))
159160
return false;

0 commit comments

Comments
 (0)