mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-23 05:34:48 +02:00
Merge pull request #9861 from ymartin-ovh/issue-9752
icinga2: address comment loading where host reference is not found
This commit is contained in:
commit
880632b93a
1
AUTHORS
1
AUTHORS
@ -300,6 +300,7 @@ Winfried Angele <winfried.angele@gmail.com>
|
|||||||
Wolfgang Nieder <wnd@gmx.net>
|
Wolfgang Nieder <wnd@gmx.net>
|
||||||
XnS <git@xns.be>
|
XnS <git@xns.be>
|
||||||
Yannick Charton <tontonitch-pro@yahoo.fr>
|
Yannick Charton <tontonitch-pro@yahoo.fr>
|
||||||
|
Yannick Martin <yannick.martin@ovhcloud.com>
|
||||||
Yohan Jarosz <yohanjarosz@yahoo.fr>
|
Yohan Jarosz <yohanjarosz@yahoo.fr>
|
||||||
Yonas Habteab <yonas.habteab@icinga.com>
|
Yonas Habteab <yonas.habteab@icinga.com>
|
||||||
Zachary McGibbon <zachary.mcgibbon@gmail.com>
|
Zachary McGibbon <zachary.mcgibbon@gmail.com>
|
||||||
|
@ -65,7 +65,7 @@ void Comment::OnAllConfigLoaded()
|
|||||||
|
|
||||||
Host::Ptr host = Host::GetByName(GetHostName());
|
Host::Ptr host = Host::GetByName(GetHostName());
|
||||||
|
|
||||||
if (GetServiceName().IsEmpty())
|
if (GetServiceName().IsEmpty() || ! host)
|
||||||
m_Checkable = host;
|
m_Checkable = host;
|
||||||
else
|
else
|
||||||
m_Checkable = host->GetServiceByShortName(GetServiceName());
|
m_Checkable = host->GetServiceByShortName(GetServiceName());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user