diff --git a/lib/icinga/service-check.cpp b/lib/icinga/service-check.cpp index f6ea3092f..57e805bf0 100644 --- a/lib/icinga/service-check.cpp +++ b/lib/icinga/service-check.cpp @@ -301,9 +301,13 @@ String Service::GetLastCheckLongOutput(void) const String Service::GetLastCheckPerfData(void) const { Dictionary::Ptr cr = GetLastCheckResult(); - String perfdata = cr->Get("performance_data_raw"); + String perfdata; - boost::algorithm::replace_all(perfdata, "\n", "\\n"); + if (cr) { + perfdata = cr->Get("performance_data_raw"); + + boost::algorithm::replace_all(perfdata, "\n", "\\n"); + } return perfdata; }