diff --git a/Linphone/model/core/CoreModel.cpp b/Linphone/model/core/CoreModel.cpp index a95135cc7..51a3ec517 100644 --- a/Linphone/model/core/CoreModel.cpp +++ b/Linphone/model/core/CoreModel.cpp @@ -225,6 +225,8 @@ void CoreModel::onAccountAdded(const std::shared_ptr &core, } void CoreModel::onAccountRemoved(const std::shared_ptr &core, const std::shared_ptr &account) { + if (core->getDefaultAccount() == nullptr && core->getAccountList().size() > 0) + core->setDefaultAccount(core->getAccountList().front()); emit accountRemoved(core, account); } void CoreModel::onAccountRegistrationStateChanged(const std::shared_ptr &core,