mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-25 22:54:57 +02:00
Revert "Remove redundant check for valid task object."
This reverts commit 8337795ff714d04443a7666faa7916641021fca7.
This commit is contained in:
parent
4668e458ce
commit
c7f9a78f4d
@ -216,6 +216,12 @@ void Notification::BeginExecuteNotificationHelper(const Dictionary::Ptr& notific
|
|||||||
ScriptTask::Ptr task;
|
ScriptTask::Ptr task;
|
||||||
task = MakeMethodTask("notify", arguments);
|
task = MakeMethodTask("notify", arguments);
|
||||||
|
|
||||||
|
if (!task) {
|
||||||
|
Logger::Write(LogWarning, "icinga", "Notification object '" + GetName() + "' doesn't have a 'notify' method.");
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
ObjectLock olock(this);
|
ObjectLock olock(this);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user