diff --git a/core/class/cmd.class.php b/core/class/cmd.class.php index e7a76a9f28..bc1df537a9 100644 --- a/core/class/cmd.class.php +++ b/core/class/cmd.class.php @@ -1134,10 +1134,12 @@ public function remove() { viewData::removeByTypeLinkId('cmd', $this->getId()); dataStore::removeByTypeLinkId('cmd', $this->getId()); $eqLogic = $this->getEqLogic(); - $eqLogic->setStatus(array( - 'warning' => 0, - 'danger' => 0, - )); + if (is_object($eqLogic)) { + $eqLogic->setStatus(array( + 'warning' => 0, + 'danger' => 0, + )); + } $this->emptyHistory(); cache::delete('cmdCacheAttr' . $this->getId()); cache::delete('cmd' . $this->getId());