Skip to content

Commit efdd1ff

Browse files
committed
icinga2: address comment loading where host reference is not found
address #9752: check if host reference is valid
1 parent bba6a76 commit efdd1ff

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/icinga/comment.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ void Comment::OnAllConfigLoaded()
6565

6666
Host::Ptr host = Host::GetByName(GetHostName());
6767

68-
if (GetServiceName().IsEmpty())
68+
if (GetServiceName().IsEmpty() || ! host)
6969
m_Checkable = host;
7070
else
7171
m_Checkable = host->GetServiceByShortName(GetServiceName());

0 commit comments

Comments
 (0)