mirror of https://github.com/Icinga/icinga2.git
Service: don't rely on the own host being already set during derivative state calculation
refs #7284
This commit is contained in:
parent
58cb1e0341
commit
3824b03913
|
@ -125,7 +125,7 @@ int Service::GetSeverity() const
|
|||
severity |= SeverityFlagDowntime;
|
||||
else if (IsAcknowledged())
|
||||
severity |= SeverityFlagAcknowledgement;
|
||||
else if (m_Host->GetProblem())
|
||||
else if (m_Host && m_Host->GetProblem())
|
||||
severity |= SeverityFlagHostDown;
|
||||
else
|
||||
severity |= SeverityFlagUnhandled;
|
||||
|
@ -137,7 +137,7 @@ int Service::GetSeverity() const
|
|||
|
||||
bool Service::GetHandled() const
|
||||
{
|
||||
return Checkable::GetHandled() || m_Host->GetProblem();
|
||||
return Checkable::GetHandled() || (m_Host && m_Host->GetProblem());
|
||||
}
|
||||
|
||||
bool Service::IsStateOK(ServiceState state) const
|
||||
|
|
Loading…
Reference in New Issue