Check if last check result is null before executing the command

This commit is contained in:
Mattia Codato 2020-07-31 08:53:10 +02:00 committed by Noah Hilverling
parent 5467b7aa37
commit f790b7699d

View File

@ -637,6 +637,8 @@ Dictionary::Ptr ApiActions::ExecuteCommand(const ConfigObject::Ptr& object,
);
CheckResult::Ptr cr = checkable->GetLastCheckResult();
if (!cr)
cr = new CheckResult();
/* Check if resolved_command exists and it is of type command_type */
Dictionary::Ptr execMacros = new Dictionary();