mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-30 03:55:40 +00:00
Update GamesDBJSONScraper.cpp
prevent `IsObject` assertion failure during `HasMember` call.
This commit is contained in:
parent
8878cb0b4c
commit
718eae91fb
|
@ -322,6 +322,9 @@ void processGame(const Value& game, const Value& boxart, std::vector<ScraperSear
|
|||
result.mdl.set("players", std::to_string(game["players"].GetInt()));
|
||||
}
|
||||
|
||||
|
||||
if (boxart.HasMember("data") && boxart["data"].IsObject())
|
||||
{
|
||||
std::string id = std::to_string(getIntOrThrow(game, "id"));
|
||||
if (boxart["data"].HasMember(id.c_str()))
|
||||
{
|
||||
|
@ -329,6 +332,7 @@ void processGame(const Value& game, const Value& boxart, std::vector<ScraperSear
|
|||
result.thumbnailUrl = baseImageUrlThumb + "/" + image;
|
||||
result.imageUrl = baseImageUrlLarge + "/" + image;
|
||||
}
|
||||
}
|
||||
|
||||
results.push_back(result);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue