From 47589125e0157198264b1098cbadf41e647a7a07 Mon Sep 17 00:00:00 2001 From: orignal Date: Tue, 9 Dec 2014 14:59:19 -0500 Subject: [PATCH] look for LeaseSet in local database --- api/api.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/api.cpp b/api/api.cpp index c9e69229..e70b8645 100644 --- a/api/api.cpp +++ b/api/api.cpp @@ -79,7 +79,8 @@ namespace api std::shared_ptr CreateStream (i2p::client::ClientDestination * dest, const i2p::data::IdentHash& remote) { - auto leaseSet = i2p::data::netdb.FindLeaseSet (remote); + if (!dest) return nullptr; + auto leaseSet = dest->FindLeaseSet (remote); if (leaseSet) { auto stream = dest->CreateStream (*leaseSet);