aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2018-12-04 17:07:51 +0200
committerRiccardo Spagni <ric@spagni.net>2018-12-04 17:07:51 +0200
commit398f7076bb67d749d76a1b275e5bd771e9714b4b (patch)
tree792b06ae57ec00c1b5d704655a7d81cf7fbe7064 /src/wallet
parentMerge pull request #4850 (diff)
parentvarious: do not propagate exception through dtor (diff)
downloadmonero-398f7076bb67d749d76a1b275e5bd771e9714b4b.tar.xz
Merge pull request #4853
2b3595d0 various: do not propagate exception through dtor (moneromooo-monero)
Diffstat (limited to 'src/wallet')
-rw-r--r--src/wallet/wallet2.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
index f21b074b6..498addad5 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -830,7 +830,12 @@ wallet_keys_unlocker::~wallet_keys_unlocker()
{
if (!locked)
return;
- w.encrypt_keys(key);
+ try { w.encrypt_keys(key); }
+ catch (...)
+ {
+ MERROR("Failed to re-encrypt wallet keys");
+ // do not propagate through dtor, we'd crash
+ }
}
wallet2::wallet2(network_type nettype, uint64_t kdf_rounds, bool unattended):