algo/master: fix crash on null target in getNextTarget

This commit is contained in:
Vaxry 2026-03-17 14:47:07 -04:00
parent 0fe2297915
commit 67d178083e
Signed by: vaxry
GPG key ID: 665806380871D640

View file

@ -1256,7 +1256,7 @@ SP<ITarget> CMasterAlgorithm::getNextCandidate(SP<ITarget> old) {
}
SP<ITarget> CMasterAlgorithm::getNextTarget(SP<ITarget> t, bool next, bool loop) {
if (t->floating())
if (!t || t->floating())
return nullptr;
const auto PNODE = getNodeFromTarget(t);