Fix crash that might occur in a situation where icinga should not crash...

refs #5356
This commit is contained in:
Johannes Meyer 2013-12-17 16:01:33 +01:00
parent 772f319926
commit 12d32ad719
1 changed files with 3 additions and 1 deletions

View File

@ -72,7 +72,9 @@ String Service::AddDowntime(const String& author, const String& comment,
if (!triggeredBy.IsEmpty()) {
Downtime::Ptr triggerDowntime = GetDowntimeByID(triggeredBy);
downtime->SetTriggeredByLegacyId(triggerDowntime->GetLegacyId());
if (triggerDowntime)
downtime->SetTriggeredByLegacyId(triggerDowntime->GetLegacyId());
}
int legacy_id;