Fix crash in Service::IsReachable().

This commit is contained in:
Gunnar Beutner 2013-02-28 10:26:33 +01:00
parent 975c527b07
commit cb907f4f3b
1 changed files with 5 additions and 0 deletions

View File

@ -191,6 +191,11 @@ bool Service::IsReachable(const Service::Ptr& self)
BOOST_FOREACH(const Host::Ptr& host, Service::GetParentHosts(self)) {
Service::Ptr hc = Host::GetHostCheckService(host);
/* ignore hosts that don't have a hostcheck */
if (!hc)
continue;
ObjectLock olock(hc);
/* ignore ourselves */