Skip to content
Snippets Groups Projects
Commit 3e6c0690 authored by Emmanuel Lepage Vallée's avatar Emmanuel Lepage Vallée Committed by gerrit2
Browse files

account: Fix infinite loop

A little tested feature had a clear infinite loop, but it is used by
no client by default, the KDE client still has an option to enable
the manual account selection.

Change-Id: I60c78a86f93beebd0c397c964bfee26591eca0a7
parent 9494128b
Branches
Tags
No related merge requests found
...@@ -159,7 +159,8 @@ void AvailableAccountModelPrivate::setPriorAccount(const Account* account) ...@@ -159,7 +159,8 @@ void AvailableAccountModelPrivate::setPriorAccount(const Account* account)
m_spPriorAccount = const_cast<Account*>(account); m_spPriorAccount = const_cast<Account*>(account);
if (changed) { if (changed) {
auto& self = AvailableAccountModel::instance(); auto& self = AvailableAccountModel::instance();
Account* a = self.currentDefaultAccount();
Account* a = account ? const_cast<Account*>(account) : self.currentDefaultAccount();
emit self.currentDefaultAccountChanged(a); emit self.currentDefaultAccountChanged(a);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment