From b03632a6710e9bb1f7d73e0ccd39860c591d84e9 Mon Sep 17 00:00:00 2001 From: Philip Kaufmann Date: Sun, 7 Dec 2014 12:57:11 +0100 Subject: [PATCH] add missing CAutoFile::IsNull() check in main Rebased-From: 84857e87e42e412336ea60d0f8544c1679bab827 Github-Pull: #5437 --- src/main.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index 9e1c41ada..6c39e1057 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;