Commit 05133608 authored by Ghislain MARY's avatar Ghislain MARY

Fix crash when selecting SIP account.

parent 4173ec84
......@@ -108,6 +108,8 @@ QVariantMap AccountSettingsModel::getProxyConfigDescription (const shared_ptr<li
map["registrationState"] = ::mapLinphoneRegistrationStateToUi(proxyConfig->getState());
shared_ptr<linphone::NatPolicy> natPolicy = proxyConfig->getNatPolicy();
if (!natPolicy)
natPolicy = proxyConfig->getCore()->createNatPolicy();
map["iceEnabled"] = natPolicy->iceEnabled();
map["turnEnabled"] = natPolicy->turnEnabled();
map["stunServer"] = ::Utils::coreStringToAppString(natPolicy->getStunServer());
......@@ -180,6 +182,8 @@ bool AccountSettingsModel::addOrUpdateProxyConfig (
);
shared_ptr<linphone::NatPolicy> natPolicy = proxyConfig->getNatPolicy();
if (!natPolicy)
natPolicy = proxyConfig->getCore()->createNatPolicy();
natPolicy->enableIce(data["iceEnabled"].toBool());
natPolicy->enableStun(data["iceEnabled"].toBool());
natPolicy->enableTurn(data["turnEnabled"].toBool());
......
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