diff --git a/src/dht_proxy_server.cpp b/src/dht_proxy_server.cpp index 586a8b77..6aef30ac 100644 --- a/src/dht_proxy_server.cpp +++ b/src/dht_proxy_server.cpp @@ -322,7 +322,7 @@ DhtProxyServer::putEncrypted(const std::shared_ptr& session) c std::string strJson(buf.begin(), buf.end()); bool parsingSuccessful = reader.parse(strJson.c_str(), root); InfoHash to(root["to"].asString()); - if (parsingSuccessful && toInfoHash) { + if (parsingSuccessful && to) { auto value = std::make_shared(root); Json::FastWriter writer; dht_->putEncrypted(key, to, value);