diff options
author | Philip Kaufmann <phil.kaufmann@t-online.de> | 2014-12-07 12:57:11 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-12-19 18:49:57 +0100 |
commit | b03632a6710e9bb1f7d73e0ccd39860c591d84e9 (patch) | |
tree | c4c32a2cdb37324b84ae725a70cafd8425b38408 /src/main.cpp | |
parent | c3c635b3167bac056030e3c8cbeb1343a4d244f5 (diff) | |
download | bitcoin-b03632a6710e9bb1f7d73e0ccd39860c591d84e9.tar.xz |
add missing CAutoFile::IsNull() check in main
Rebased-From: 84857e87e42e412336ea60d0f8544c1679bab827
Github-Pull: #5437
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp index 9e1c41ada7..6c39e10570 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1079,6 +1079,8 @@ bool GetTransaction(const uint256 &hash, CTransaction &txOut, uint256 &hashBlock CDiskTxPos postx; if (pblocktree->ReadTxIndex(hash, postx)) { CAutoFile file(OpenBlockFile(postx, true), SER_DISK, CLIENT_VERSION); + if (file.IsNull()) + return error("%s: OpenBlockFile failed", __func__); CBlockHeader header; try { file >> header; |