Commit 40ca44e5 authored by Aloshi's avatar Aloshi

Fixed crash when TheGamesDB scraper sees a platform it doesn't support.

parent f7f51c57
......@@ -73,8 +73,14 @@ std::unique_ptr<ScraperSearchHandle> GamesDBScraper::getResultsAsync(const Scrap
if(params.system->getPlatformId() != PLATFORM_UNKNOWN)
{
path += "&platform=";
path += HttpReq::urlEncode(gamesdb_platformid_map.at(params.system->getPlatformId()));
auto platformIt = gamesdb_platformid_map.find(params.system->getPlatformId());
if(platformIt != gamesdb_platformid_map.end())
{
path += "&platform=";
path += HttpReq::urlEncode(platformIt->second);
}else{
LOG(LogWarning) << "TheGamesDB scraper warning - no support for platform " << getPlatformName(params.system->getPlatformId());
}
}
path = "thegamesdb.net" + path;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment