NOISSUE fix a bunch of valgrind errors

This commit is contained in:
Petr Mrázek
2020-06-28 13:25:53 +02:00
parent a0ef20a264
commit cd57e354fe
3 changed files with 8 additions and 4 deletions

View File

@ -184,7 +184,8 @@ void readIndex(const QString & path, QMap<QString, Language>& languages)
int index = 1;
try
{
auto doc = Json::requireObject(Json::requireDocument(data));
auto toplevel_doc = Json::requireDocument(data);
auto doc = Json::requireObject(toplevel_doc);
auto file_type = Json::requireString(doc, "file_type");
if(file_type != "MMC-TRANSLATION-INDEX")
{