mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-08 17:05:25 +02:00
Merge pull request #10296 from Icinga/comment-loading-nullptr-deference
Address comment loading where host reference is not found gracefully
This commit is contained in:
commit
14b854d891
1
AUTHORS
1
AUTHORS
@ -296,6 +296,7 @@ Winfried Angele <winfried.angele@gmail.com>
|
||||
Wolfgang Nieder <wnd@gmx.net>
|
||||
XnS <git@xns.be>
|
||||
Yannick Charton <tontonitch-pro@yahoo.fr>
|
||||
Yannick Martin <yannick.martin@ovhcloud.com>
|
||||
Yohan Jarosz <yohanjarosz@yahoo.fr>
|
||||
Yonas Habteab <yonas.habteab@icinga.com>
|
||||
Zachary McGibbon <zachary.mcgibbon@gmail.com>
|
||||
|
@ -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…
x
Reference in New Issue
Block a user