Bugfix: null derefence in Service::ApplyCheckResult.

This commit is contained in:
Gunnar Beutner 2013-01-27 11:49:23 +01:00
parent ce49e3856b
commit e10d4f6b8b

View File

@ -517,8 +517,11 @@ void Service::ApplyCheckResult(const Dictionary::Ptr& cr)
}
/* reschedule dependencies */
Dictionary::Ptr dependencies = GetDependencies();
if (dependencies) {
String svc;
BOOST_FOREACH(tie(tuples::ignore, svc), GetDependencies()) {
BOOST_FOREACH(tie(tuples::ignore, svc), dependencies) {
if (!Service::Exists(svc))
continue;
@ -527,6 +530,7 @@ void Service::ApplyCheckResult(const Dictionary::Ptr& cr)
}
}
}
}
ServiceState Service::StateFromString(const String& state)
{