ringdht: missing upnp nullptr check

Another one...

Change-Id: I0394e1292dc0c05431203af9911567697c44147d
Reviewed-by: Philippe Gorley <philippe.gorley@savoirfairelinux.com>
This commit is contained in:
Guillaume Roguez
2017-06-22 16:31:40 -04:00
committed by Adrien Béraud
parent 6d7c5f966e
commit 2b6f3b0796

View File

@ -2555,9 +2555,10 @@ RingAccount::doUnregister(std::function<void(bool)> released_cb)
pendingSipCalls_.clear();
}
/* RING_DBG("UPnP: removing port mapping for DHT account."); */
upnp_->setIGDListener();
upnp_->removeMappings();
if (upnp_) {
upnp_->setIGDListener();
upnp_->removeMappings();
}
Manager::instance().unregisterEventHandler((uintptr_t)this);
saveNodes(dht_.exportNodes());