diff --git a/src/sip/sipaccount.cpp b/src/sip/sipaccount.cpp index 525a7d6c544f5ee5ba292bf83a67f4beac7ffa77..621976cd9686636768d7dcbd84d4c4cf8ba7cb09 100644 --- a/src/sip/sipaccount.cpp +++ b/src/sip/sipaccount.cpp @@ -961,7 +961,8 @@ SIPAccount::startKeepAliveTimer() if (auto sipAccount = static_cast<std::weak_ptr<SIPAccount>*>(te->user_data)->lock()) sipAccount->keepAliveRegistrationCb(); }; - keepAliveTimer_.user_data = new std::weak_ptr<SIPAccount>(weak()); + if (not keepAliveTimer_.user_data) + keepAliveTimer_.user_data = new std::weak_ptr<SIPAccount>(weak()); keepAliveTimer_.id = timerIdDist_(rand); // expiration may be undetermined during the first registration request