mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-23 05:34:48 +02:00
Validate Zone::GetLocalZone() before using
(cherry picked from commit b09e7b287e6b4bbc277c9ef7828e34f884927f82)
This commit is contained in:
parent
a557f47e2a
commit
ee915ed5d2
@ -252,7 +252,11 @@ String Downtime::AddDowntime(const Checkable::Ptr& checkable, const String& auth
|
||||
attrs->Set("entry_time", Utility::GetTime());
|
||||
|
||||
if (!scheduledDowntime.IsEmpty()) {
|
||||
attrs->Set("authoritative_zone", Zone::GetLocalZone()->GetName());
|
||||
auto localZone (Zone::GetLocalZone());
|
||||
|
||||
if (localZone) {
|
||||
attrs->Set("authoritative_zone", localZone->GetName());
|
||||
}
|
||||
}
|
||||
|
||||
Host::Ptr host;
|
||||
|
Loading…
x
Reference in New Issue
Block a user