diff --git a/src/main.cpp b/src/main.cpp index 9c038f90f..3e0741ae7 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1086,6 +1086,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;