mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-02-12 17:48:43 +00:00
Don't try to read version json when we didn't get a response from the server.
This commit is contained in:
parent
d50233526c
commit
f78de96d80
@ -594,9 +594,15 @@ void Config::Save() {
|
||||
void Config::DownloadCompletedCallback(http::Download &download) {
|
||||
if (download.ResultCode() != 200) {
|
||||
ERROR_LOG(LOADER, "Failed to download version.json");
|
||||
return;
|
||||
}
|
||||
std::string data;
|
||||
download.buffer().TakeAll(&data);
|
||||
if (data.empty()) {
|
||||
ERROR_LOG(LOADER, "Version check: Empty data from server!");
|
||||
return;
|
||||
}
|
||||
|
||||
JsonReader reader(data.c_str(), data.size());
|
||||
const json_value *root = reader.root();
|
||||
std::string version = root->getString("version", "");
|
||||
|
Loading…
x
Reference in New Issue
Block a user