aboutsummaryrefslogtreecommitdiff
path: root/src/node/eviction.cpp
diff options
context:
space:
mode:
authorfurszy <matiasfurszyfer@protonmail.com>2024-09-12 18:50:43 -0300
committerfurszy <matiasfurszyfer@protonmail.com>2024-09-12 19:25:45 -0300
commita965f2bc07a3588f8c2b8d6a542961562e3f5d0e (patch)
tree58fd22ce27de075484d09173dafd4e5d81237711 /src/node/eviction.cpp
parentcf0120ff024aa73a56f2975c832fda6aa8146dfa (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