From 03c18367ffeed3eddf9d91a9a0ec7ec87c5376a9 Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Fri, 5 Jul 2013 11:46:20 +0200 Subject: [PATCH] livestatus: hosttable: fix checkperiod null ptr refs #4372 --- components/livestatus/hoststable.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/components/livestatus/hoststable.cpp b/components/livestatus/hoststable.cpp index b98b54d71..178bdd407 100644 --- a/components/livestatus/hoststable.cpp +++ b/components/livestatus/hoststable.cpp @@ -250,14 +250,12 @@ Value HostsTable::CheckPeriodAccessor(const Object::Ptr& object) if (!hc) return Value(); - return hc->GetCheckPeriod()->GetName(); - /* - TimePeriod::Ptr timeperiod = hc->GetCheckPeriod; + TimePeriod::Ptr timeperiod = hc->GetCheckPeriod(); + if (!timeperiod) return Value(); return timeperiod->GetName(); - */ } Value HostsTable::NotesAccessor(const Object::Ptr& object)