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
parent 75e0e164e4
commit a5698d5fde

View File

@ -667,6 +667,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();