[News] Check if revision is a string

This commit is contained in:
momo5502 2017-02-12 13:06:54 +01:00
parent aa76d38f3c
commit 358d039244

View File

@ -64,6 +64,8 @@ namespace Components
std::string error; std::string error;
json11::Json client = json11::Json::parse(_client.data(), error); json11::Json client = json11::Json::parse(_client.data(), error);
if (client["revision"].is_string())
{
std::string revisionString = client["revision"].string_value(); std::string revisionString = client["revision"].string_value();
if (!revisionString.empty()) if (!revisionString.empty())
@ -75,6 +77,7 @@ namespace Components
} }
} }
} }
}
void News::LaunchUpdater(std::string params) void News::LaunchUpdater(std::string params)
{ {