popups: avoid infinite recursion in bf

This commit is contained in:
Vaxry 2024-05-10 02:28:21 +01:00
parent a7e23d2f1e
commit db30ff63e6

View File

@ -294,7 +294,8 @@ void CPopup::bfHelper(std::vector<CPopup*> nodes, std::function<void(CPopup*, vo
}
}
bfHelper(nodes2, fn, data);
if (!nodes2.empty())
bfHelper(nodes2, fn, data);
}
void CPopup::breadthfirst(std::function<void(CPopup*, void*)> fn, void* data) {