mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-02-11 17:52:48 +01:00
Get*Union: disallow nulltpr Refs
This commit is contained in:
@@ -1595,6 +1595,7 @@ std::vector<TxGraph::Ref*> TxGraphImpl::GetAncestorsUnion(std::span<const Ref* c
|
||||
std::vector<std::pair<Cluster*, DepGraphIndex>> matches;
|
||||
matches.reserve(args.size());
|
||||
for (auto arg : args) {
|
||||
Assume(arg);
|
||||
// Skip empty Refs.
|
||||
if (GetRefGraph(*arg) == nullptr) continue;
|
||||
Assume(GetRefGraph(*arg) == this);
|
||||
@@ -1627,6 +1628,7 @@ std::vector<TxGraph::Ref*> TxGraphImpl::GetDescendantsUnion(std::span<const Ref*
|
||||
std::vector<std::pair<Cluster*, DepGraphIndex>> matches;
|
||||
matches.reserve(args.size());
|
||||
for (auto arg : args) {
|
||||
Assume(arg);
|
||||
// Skip empty Refs.
|
||||
if (GetRefGraph(*arg) == nullptr) continue;
|
||||
Assume(GetRefGraph(*arg) == this);
|
||||
|
||||
Reference in New Issue
Block a user