add missing CAutoFile::IsNull() check in main
Rebased-From: ccd056a30db0ba5e04b858a682907b378e464d34 Github-Pull: #5437
This commit is contained in:
parent
cf875367d2
commit
84857e87e4
1 changed files with 2 additions and 0 deletions
|
@ -1086,6 +1086,8 @@ bool GetTransaction(const uint256 &hash, CTransaction &txOut, uint256 &hashBlock
|
||||||
CDiskTxPos postx;
|
CDiskTxPos postx;
|
||||||
if (pblocktree->ReadTxIndex(hash, postx)) {
|
if (pblocktree->ReadTxIndex(hash, postx)) {
|
||||||
CAutoFile file(OpenBlockFile(postx, true), SER_DISK, CLIENT_VERSION);
|
CAutoFile file(OpenBlockFile(postx, true), SER_DISK, CLIENT_VERSION);
|
||||||
|
if (file.IsNull())
|
||||||
|
return error("%s: OpenBlockFile failed", __func__);
|
||||||
CBlockHeader header;
|
CBlockHeader header;
|
||||||
try {
|
try {
|
||||||
file >> header;
|
file >> header;
|
||||||
|
|
Loading…
Reference in a new issue