Prevent crash when Kraken balance answer is null.

This commit is contained in:
evilny0 2018-01-12 18:30:24 +01:00
parent ebd5ff6fcd
commit b0bd473e96

View File

@ -72,6 +72,12 @@ void ExchangeHandlerKraken::analyzeAccountBalance()
void ExchangeHandlerKraken::analyzeAccountBalanceJSON(json::value jvalue)
{
if (jvalue.is_null())
{
lerr << "Kraken balance answer is null.";
return;
}
if (jvalue["error"].size())
{
lerr << "Error in Kraken balance answer: " << jvalue["error"][0].as_string();