ringdht: fix segfault due to nullptr access

remove a nullptr access when a call is cancelled during
the ICE initialization of an outgoing call.

Change-Id: I5dc27077b7054ba8c9c0716a4d05013f6a84530c
Reviewed-by: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>
This commit is contained in:
Guillaume Roguez
2016-09-28 12:08:52 -04:00
parent ac44cbaa03
commit bcc4c172e4

View File

@ -195,11 +195,8 @@ RingAccount::newOutgoingCall(const std::string& toUrl)
std::weak_ptr<SIPCall> weak_call = call;
manager.addTask([shared_this, weak_call, toUri] {
auto call = weak_call.lock();
if (not call) {
call->onFailure();
if (not call)
return false;
}
// Create an ICE transport for SIP channel
std::shared_ptr<IceTransport> ice {};