diff --git a/lib/icinga/comment.cpp b/lib/icinga/comment.cpp index 9c0b92359..846735262 100644 --- a/lib/icinga/comment.cpp +++ b/lib/icinga/comment.cpp @@ -65,7 +65,7 @@ void Comment::OnAllConfigLoaded() Host::Ptr host = Host::GetByName(GetHostName()); - if (GetServiceName().IsEmpty()) + if (GetServiceName().IsEmpty() || ! host) m_Checkable = host; else m_Checkable = host->GetServiceByShortName(GetServiceName());