diff --git a/src/newaccountmodel.cpp b/src/newaccountmodel.cpp index b215be38b13a28a913caeeffa3066ec4749e6eaf..e28ffe89bcca86919404fd38451fefa57271d3e7 100644 --- a/src/newaccountmodel.cpp +++ b/src/newaccountmodel.cpp @@ -206,7 +206,9 @@ NewAccountModelPimpl::slotAccountRemoved(Account* account) void NewAccountModelPimpl::slotProfileUpdated(const Profile* profile) { - emit linked.profileUpdated(profile->accounts().first()->id().toStdString()); + auto& accounts = profile->accounts(); + if (!accounts.empty()) + emit linked.profileUpdated(accounts.first()->id().toStdString()); } } // namespace lrc