Fixed segfault when downloading non-dlc patches

This commit is contained in:
Geoffrey Biggs 2014-04-08 06:40:05 +09:00
parent 50cc5a2565
commit da80d9c4c9

View File

@ -700,8 +700,8 @@ void Downloader::download()
{ {
std::string XML; std::string XML;
if (config.bRemoteXML) if (config.bRemoteXML)
XML = gogAPI->getXML(games[i].dlcs[j].gamename, games[i].patches[j].id); XML = gogAPI->getXML(games[i].gamename, games[i].patches[j].id);
if (!games[i].dlcs[j].patches[j].name.empty()) if (!games[i].patches[j].name.empty())
std::cout << "Dowloading: " << games[i].patches[j].name << std::endl; std::cout << "Dowloading: " << games[i].patches[j].name << std::endl;
CURLcode result = this->downloadFile(url, filepath, XML, games[i].gamename); CURLcode result = this->downloadFile(url, filepath, XML, games[i].gamename);
std::cout << std::endl; std::cout << std::endl;