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

sipaccount: avoid segfault if sipaccount is NULL

parent 175b71f5
No related branches found
No related tags found
No related merge requests found
......@@ -834,10 +834,12 @@ std::string SIPAccount::getContactHeader() const
void SIPAccount::keepAliveRegistrationCb(UNUSED pj_timer_heap_t *th, pj_timer_entry *te)
{
SIPAccount *sipAccount = reinterpret_cast<SIPAccount *>(te->user_data);
SIPAccount *sipAccount = static_cast<SIPAccount *>(te->user_data);
if (sipAccount == NULL)
if (sipAccount == NULL) {
ERROR("Sip account is NULL while registering a new keep alive timer");
return;
}
// IP2IP default does not require keep-alive
if (sipAccount->getAccountID() == IP2IP_PROFILE)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment