Commit 79ea4b41 authored by Adrien Béraud's avatar Adrien Béraud

jamiaccount: check peer connector

Change-Id: Icfd0fba1cd1b74b58a987510e592aeb4a2565c9d
parent 650900b9
......@@ -3353,6 +3353,10 @@ JamiAccount::requestPeerConnection(
channeledConnectedCb,
const std::function<void()>& onChanneledCancelled)
{
if (not dhtPeerConnector_) {
runOnMainThread([onChanneledCancelled]{ onChanneledCancelled(); });
return;
}
dhtPeerConnector_->requestConnection(peer_id,
tid,
isVCard,
......@@ -3364,7 +3368,8 @@ JamiAccount::requestPeerConnection(
void
JamiAccount::closePeerConnection(const std::string& peer, const DRing::DataTransferId& tid)
{
dhtPeerConnector_->closeConnection(peer, tid);
if (dhtPeerConnector_)
dhtPeerConnector_->closeConnection(peer, tid);
}
void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment