diff --git a/lib/icinga/checkable.cpp b/lib/icinga/checkable.cpp index 19b65ed09..1ddb962ca 100644 --- a/lib/icinga/checkable.cpp +++ b/lib/icinga/checkable.cpp @@ -63,7 +63,7 @@ void Checkable::OnAllConfigLoaded(void) Zone::Ptr cmdZone = endpoint->GetZone(); - if (cmdZone != checkableZone && cmdZone->GetParent() != checkableZone) { + if (checkableZone && cmdZone != checkableZone && cmdZone->GetParent() != checkableZone) { BOOST_THROW_EXCEPTION(ValidationError(this, boost::assign::list_of("command_endpoint"), "Command endpoint must be in zone '" + checkableZone->GetName() + "' or in a direct child zone thereof.")); }