From 6bb9de5a962ebfc706300ec58e948718b5462d4e Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Sun, 21 Aug 2016 22:34:48 -0400 Subject: [PATCH] osx fix --- AddressBook.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/AddressBook.cpp b/AddressBook.cpp index 2c4fa1b5..78e9731f 100644 --- a/AddressBook.cpp +++ b/AddressBook.cpp @@ -543,7 +543,9 @@ namespace client auto dest = i2p::client::context.GetSharedLocalDestination (); if (dest) { - auto datagram = dest->CreateDatagramDestination (); + + auto datagram = dest->GetDatagramDestination (); + if(datagram == nullptr) datagram = dest->CreateDatagramDestination(); datagram->SetReceiver (std::bind (&AddressBook::HandleLookupResponse, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, std::placeholders::_4, std::placeholders::_5), ADDRESS_RESPONSE_DATAGRAM_PORT);