diff --git a/Tunnel.cpp b/Tunnel.cpp index dbe87a2f..f7102327 100644 --- a/Tunnel.cpp +++ b/Tunnel.cpp @@ -666,6 +666,10 @@ namespace tunnel { // trying to create one more inbound tunnel auto router = i2p::data::netdb.GetRandomRouter (); + if (!router) { + LogPrint (eLogWarning, "Tunnel: can't find any router, skip creating tunnel"); + return; + } LogPrint (eLogDebug, "Tunnel: creating one hop inbound tunnel"); CreateTunnel ( std::make_shared (std::vector > { router->GetRouterIdentity () })