Skip to content
Snippets Groups Projects
Commit b75333be authored by Tristan Matthews's avatar Tristan Matthews
Browse files

presence: avoid NULL dereference

Refs #45448
parent d739d204
Branches
Tags
No related merge requests found
......@@ -50,8 +50,15 @@ PresSubServer::pres_evsub_on_srv_state(pjsip_evsub *sub, pjsip_event *event)
return;
}
PJ_UNUSED_ARG(event);
SIPPresence * pres = Manager::instance().getSipAccount("IP2IP")->getPresence();
SIPAccount *acc = Manager::instance().getIP2IPAccount();
assert(acc);
SIPPresence * pres = acc->getPresence();
if (!pres) {
ERROR("Presence not initialized");
return;
}
pres->lock();
PresSubServer *presSubServer = static_cast<PresSubServer *>(pjsip_evsub_get_mod_data(sub, pres->getModId()));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment