aboutsummaryrefslogtreecommitdiff
path: root/src/wallet.cpp
diff options
context:
space:
mode:
authorJeff Garzik <[email protected]>2012-05-17 08:49:16 -0700
committerJeff Garzik <[email protected]>2012-05-17 08:49:16 -0700
commitcf2f7c30a3b461c8db8703f3d522076fdacd81ba (patch)
treecaa85fe1518b5998cdb7c200b4d5d74c5576b300 /src/wallet.cpp
parentMerge pull request #1316 from jgarzik/dead-code (diff)
parentAlways check return values of TxnBegin() and TxnCommit() (diff)
downloaddiscoin-cf2f7c30a3b461c8db8703f3d522076fdacd81ba.tar.xz
discoin-cf2f7c30a3b461c8db8703f3d522076fdacd81ba.zip
Merge pull request #1295 from jgarzik/txn-retval
[FIX] 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 998909897..96dc986ed 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);
}