Fix #14333, 20d83677eb: Incorrect change from index to range iteration. (#14335)

This commit is contained in:
Peter Nelson 2025-06-06 17:57:26 +01:00 committed by GitHub
parent 938acbe6ef
commit a6de925ba6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -937,11 +937,11 @@ void ClientNetworkContentSocketHandler::ReverseLookupTreeDependency(ConstContent
/* First find all direct parents. We can't use the "normal" iterator as
* we are including stuff into the vector and as such the vector's data
* store can be reallocated (and thus move), which means out iterating
* store can be reallocated (and thus move), which means our iterating
* pointer gets invalid. So fall back to the indices. */
for (const ContentInfo *ci : tree) {
for (size_t i = 0; i < tree.size(); i++) {
ConstContentVector parents;
this->ReverseLookupDependency(parents, *ci);
this->ReverseLookupDependency(parents, *tree[i]);
for (const ContentInfo *ci : parents) {
include(tree, ci);