aboutsummaryrefslogtreecommitdiff
path: root/src/wallet.cpp
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@exmulti.com>2012-05-14 01:11:11 -0400
committerJeff Garzik <jgarzik@redhat.com>2012-05-14 01:11:11 -0400
commit0fb78eae34b870b9e5b942095d340f2aae49cd60 (patch)
treee572b79b017afe24d74fdbb89b0ee3f5fe635833 /src/wallet.cpp
parent09b4e26a446c302f0cce176bf572da956bb2515e (diff)
Always check return values of TxnBegin() and TxnCommit()
Diffstat (limited to 'src/wallet.cpp')
-rw-r--r--src/wallet.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/wallet.cpp b/src/wallet.cpp
index 998909897f..96dc986edf 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -242,7 +242,8 @@ bool CWallet::EncryptWallet(const SecureString& strWalletPassphrase)
if (fFileBacked)
{
pwalletdbEncryption = new CWalletDB(strWalletFile);
- pwalletdbEncryption->TxnBegin();
+ if (!pwalletdbEncryption->TxnBegin())
+ return false;
pwalletdbEncryption->WriteMasterKey(nMasterKeyMaxID, kMasterKey);
}