Revert "Remove redundant check for valid task object."

This reverts commit 8337795ff7.
This commit is contained in:
Gunnar Beutner 2013-03-08 14:56:23 +01:00
parent 4668e458ce
commit c7f9a78f4d
1 changed files with 6 additions and 0 deletions

View File

@ -216,6 +216,12 @@ void Notification::BeginExecuteNotificationHelper(const Dictionary::Ptr& notific
ScriptTask::Ptr task;
task = MakeMethodTask("notify", arguments);
if (!task) {
Logger::Write(LogWarning, "icinga", "Notification object '" + GetName() + "' doesn't have a 'notify' method.");
return;
}
{
ObjectLock olock(this);