Skip to content

Commit

Permalink
Merge pull request #9861 from ymartin-ovh/issue-9752
Browse files Browse the repository at this point in the history
icinga2: address comment loading where host reference is not found
  • Loading branch information
julianbrost authored Jan 7, 2025
2 parents 9a000f3 + d9e3a9c commit 880632b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ Winfried Angele <[email protected]>
Wolfgang Nieder <[email protected]>
XnS <[email protected]>
Yannick Charton <[email protected]>
Yannick Martin <[email protected]>
Yohan Jarosz <[email protected]>
Yonas Habteab <[email protected]>
Zachary McGibbon <[email protected]>
Expand Down
2 changes: 1 addition & 1 deletion lib/icinga/comment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit 880632b

Please sign in to comment.