Commit ea31864e authored by Tristan Matthews's avatar Tristan Matthews

* #14444: sip: don't use call object after deleting it

parent 0b45b267
......@@ -1339,7 +1339,7 @@ SIPVoIPLink::SIPCallServerFailure(SIPCall *call)
void
SIPVoIPLink::SIPCallClosed(SIPCall *call)
{
std::string id(call->getCallId());
const std::string id(call->getCallId());
stopRtpIfCurrent(id, *call);
......@@ -1500,8 +1500,11 @@ void sdp_media_update_cb(pjsip_inv_session *inv, pj_status_t status)
if (status != PJ_SUCCESS) {
WARN("Could not negotiate offer");
SIPVoIPLink::instance()->hangup(call->getCallId());
Manager::instance().callFailure(call->getCallId());
const std::string callID(call->getCallId());
SIPVoIPLink::instance()->hangup(callID);
// call is now a dangling pointer after calling hangup
call = 0;
Manager::instance().callFailure(callID);
return;
}
......
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