wtx.GetAmounts(listReceived, listSent, nFee, strSentAccount);
// count staking reward in the appropriate account
if (wtx.IsCoinStake()) {
if (fCreditStakesToAccounts) {
CTxDestination td(listSent.front().first);
When the staking address isn't ours, listSent is empty, and so it has no front().
... if
creditstakestoaccounts=1
is setThis code is to blame:
When the staking address isn't ours,
listSent
is empty, and so it has nofront()
.