diff options
| author | Jeff Garzik <[email protected]> | 2012-05-17 08:49:16 -0700 |
|---|---|---|
| committer | Jeff Garzik <[email protected]> | 2012-05-17 08:49:16 -0700 |
| commit | cf2f7c30a3b461c8db8703f3d522076fdacd81ba (patch) | |
| tree | caa85fe1518b5998cdb7c200b4d5d74c5576b300 /src/wallet.cpp | |
| parent | Merge pull request #1316 from jgarzik/dead-code (diff) | |
| parent | Always check return values of TxnBegin() and TxnCommit() (diff) | |
| download | discoin-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.cpp | 3 |
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); } |