diff options
author | furszy <matiasfurszyfer@protonmail.com> | 2024-09-12 18:50:43 -0300 |
---|---|---|
committer | furszy <matiasfurszyfer@protonmail.com> | 2024-09-12 19:25:45 -0300 |
commit | a965f2bc07a3588f8c2b8d6a542961562e3f5d0e (patch) | |
tree | 58fd22ce27de075484d09173dafd4e5d81237711 /src/node/eviction.cpp | |
parent | cf0120ff024aa73a56f2975c832fda6aa8146dfa (diff) |
gui: fix crash when closing wallet
The crash occurs because 'WalletController::removeAndDeleteWallet' is called
twice for the same wallet model: first in the GUI's button connected function
'WalletController::closeWallet', and then again when the backend emits the
'WalletModel::unload' signal.
This causes the issue because 'removeAndDeleteWallet' inlines an
erase(std::remove()). So, if 'std::remove' returns an iterator to the end
(indicating the element wasn't found because it was already erased), the
subsequent call to 'erase' leads to an undefined behavior.
Diffstat (limited to 'src/node/eviction.cpp')
0 files changed, 0 insertions, 0 deletions