diff options
-rw-r--r-- | src/gui/accountmanager.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/gui/accountmanager.cpp b/src/gui/accountmanager.cpp index af522f8cd..01abe5c61 100644 --- a/src/gui/accountmanager.cpp +++ b/src/gui/accountmanager.cpp @@ -397,9 +397,8 @@ AccountPtr AccountManager::createAccount() void AccountManager::shutdown() { - const auto accountsCopy = _accounts; - _accounts.clear(); - for (const auto &acc : accountsCopy) { + const auto accounts = std::move(_accounts); + for (const auto &acc : accounts) { emit accountRemoved(acc.data()); } } |