mirror of
https://github.com/Icinga/icinga2.git
synced 2026-06-09 00:32:12 -04:00
icinga2: address comment loading where host reference is not found
address #9752: check if host reference is valid
This commit is contained in:
parent
d551eaea27
commit
5e92450877
1 changed files with 1 additions and 1 deletions
|
|
@ -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());
|
||||
|
|
|
|||
Loading…
Reference in a new issue