Fixes #2480. Null entry in map was dereferenced leading to a segfault.
This commit is contained in:
parent
5df11e9d8e
commit
9b5da42745
|
@ -589,6 +589,10 @@ bool AsyncRPCOperation_sendmany::main_impl() {
|
|||
{
|
||||
LOCK2(cs_main, pwalletMain->cs_wallet);
|
||||
const CWalletTx& wtx = pwalletMain->mapWallet[jso.hash];
|
||||
// Zero confirmaton notes belong to transactions which have not yet been mined
|
||||
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]->nHeight;
|
||||
wtxDepth = wtx.GetDepthInMainChain();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue