]> granicus.if.org Git - icinga2/commitdiff
Revert "Remove redundant check for valid task object."
authorGunnar Beutner <gunnar.beutner@netways.de>
Fri, 8 Mar 2013 13:56:23 +0000 (14:56 +0100)
committerGunnar Beutner <gunnar.beutner@netways.de>
Fri, 8 Mar 2013 13:56:23 +0000 (14:56 +0100)
This reverts commit 8337795ff714d04443a7666faa7916641021fca7.

lib/icinga/notification.cpp

index 3fbcf9508322999dbbc22095a79c5045d076f797..11d92ef3c5c4f7411fc72346691dad04159de9e3 100644 (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);