diff --git a/lib/icinga/timeperiod.cpp b/lib/icinga/timeperiod.cpp index 97183223e..28f418a32 100644 --- a/lib/icinga/timeperiod.cpp +++ b/lib/icinga/timeperiod.cpp @@ -235,7 +235,9 @@ void TimePeriod::Merge(const TimePeriod::Ptr& timeperiod, bool include) void TimePeriod::UpdateRegion(double begin, double end, bool clearExisting) { - if (!clearExisting) { + if (clearExisting) { + SetSegments(new Array()); + } else { if (begin < GetValidEnd()) begin = GetValidEnd();