Hosts/services should not have themselves as parents

fixes #7483
This commit is contained in:
Gunnar Beutner 2014-10-29 10:45:23 +01:00
parent 75b599c801
commit 57747ccdb1
1 changed files with 2 additions and 2 deletions

View File

@ -109,7 +109,7 @@ std::set<Checkable::Ptr> Checkable::GetParents(void) const
BOOST_FOREACH(const Dependency::Ptr& dep, GetDependencies()) {
Checkable::Ptr parent = dep->GetParent();
if (parent)
if (parent && parent.get() != this)
parents.insert(parent);
}
@ -123,7 +123,7 @@ std::set<Checkable::Ptr> Checkable::GetChildren(void) const
BOOST_FOREACH(const Dependency::Ptr& dep, GetReverseDependencies()) {
Checkable::Ptr service = dep->GetChild();
if (service)
if (service && service.get() != this)
parents.insert(service);
}