git://git.novaco.in
/
novacoin.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
Always check return values of TxnBegin() and TxnCommit()
[novacoin.git]
/
src
/
wallet.cpp
diff --git
a/src/wallet.cpp
b/src/wallet.cpp
index
bd17bd9
..
bb7f11c
100644
(file)
--- a/
src/wallet.cpp
+++ b/
src/wallet.cpp
@@
-234,7
+234,8
@@
bool CWallet::EncryptWallet(const SecureString& strWalletPassphrase)
if (fFileBacked)
{
pwalletdbEncryption = new CWalletDB(strWalletFile);
- pwalletdbEncryption->TxnBegin();
+ if (!pwalletdbEncryption->TxnBegin())
+ return false;
pwalletdbEncryption->WriteMasterKey(nMasterKeyMaxID, kMasterKey);
}