Check for null ptr before ->

This commit is contained in:
jl777
2019-04-21 02:16:55 -11:00
parent db2cf15b85
commit 06bed214f9
5 changed files with 17 additions and 5 deletions

View File

@@ -836,7 +836,7 @@ bool AsyncRPCOperation_sendmany::main_impl() {
if (mapBlockIndex.find(wtx.hashBlock) == mapBlockIndex.end()) {
throw JSONRPCError(RPC_WALLET_ERROR, strprintf("mapBlockIndex does not contain block hash %s", wtx.hashBlock.ToString()));
}
wtxHeight = mapBlockIndex[wtx.hashBlock]->GetHeight();
wtxHeight = komodo_blockheight(wtx.hashBlock);
wtxDepth = wtx.GetDepthInMainChain();
}
LogPrint("zrpcunsafe", "%s: spending note (txid=%s, vjoinsplit=%d, ciphertext=%d, amount=%s, height=%d, confirmations=%d)\n",