Merge #13683: wallet: Introduce assertion to document the assumption that cache and cache_used are always set in tandem
d06330396f
wallet: Avoid potential null pointer dereference in CWalletTx::GetAvailableCredit(...) (practicalswift) Pull request description: Avoid potential null pointer dereference in `CWalletTx::GetAvailableCredit(...)`. Introduced in4279da4785
. Tree-SHA512: 92d1da9682f0bab11f6f96395ca30549331b0a056cbceb7e1a7f98b3d17d10082aaeed0907cafd46f4164b0e0f4b77e01f78bfd7d24e0503a66c6942ae842aa5
This commit is contained in:
commit
e8c74348d3
1 changed files with 1 additions and 0 deletions
|
@ -1977,6 +1977,7 @@ CAmount CWalletTx::GetAvailableCredit(bool fUseCache, const isminefilter& filter
|
|||
|
||||
if (cache) {
|
||||
*cache = nCredit;
|
||||
assert(cache_used);
|
||||
*cache_used = true;
|
||||
}
|
||||
return nCredit;
|
||||
|
|
Loading…
Reference in a new issue