Skip to content

Commit cdc0ba3

Browse files
authored
Check if XML reader stopped because of an error. (#3034)
1 parent b74aa70 commit cdc0ba3

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

gui/cppchecklibrarydata.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,8 +279,12 @@ QString CppcheckLibraryData::open(QIODevice &file)
279279
break;
280280
}
281281
}
282-
283-
return QString();
282+
if (xmlReader.hasError()) {
283+
return xmlReader.errorString();
284+
}
285+
else {
286+
return QString();
287+
}
284288
}
285289

286290
static void writeContainerFunctions(QXmlStreamWriter &xmlWriter, const QString &name, int extra, const QList<struct CppcheckLibraryData::Container::Function> &functions)

0 commit comments

Comments
 (0)