Skip to content

Commit 14b854d

Browse files
authored
Merge pull request #10296 from Icinga/comment-loading-nullptr-deference
Address comment loading where host reference is not found gracefully
2 parents 7defb0c + 9887ad7 commit 14b854d

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

AUTHORS

+1
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,7 @@ Winfried Angele <winfried.angele@gmail.com>
296296
Wolfgang Nieder <wnd@gmx.net>
297297
XnS <git@xns.be>
298298
Yannick Charton <tontonitch-pro@yahoo.fr>
299+
Yannick Martin <yannick.martin@ovhcloud.com>
299300
Yohan Jarosz <yohanjarosz@yahoo.fr>
300301
Yonas Habteab <yonas.habteab@icinga.com>
301302
Zachary McGibbon <zachary.mcgibbon@gmail.com>

lib/icinga/comment.cpp

+1-1
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)