diff --git a/application/cmdbabstract.class.inc.php b/application/cmdbabstract.class.inc.php
index ba60776c6..f712a249d 100644
--- a/application/cmdbabstract.class.inc.php
+++ b/application/cmdbabstract.class.inc.php
@@ -3218,13 +3218,13 @@ EOF
if ($oAttDef->GetEditClass() == 'Document')
{
$oDocument = $this->Get($sAttCode);
- if (!$oDocument->IsEmpty())
+ if (is_object($oDocument) && !$oDocument->IsEmpty())
{
$sDisplayValue = $this->GetAsHTML($sAttCode);
$sDisplayValue .= "
".Dict::Format('UI:OpenDocumentInNewWindow_',
- $oDocument->GetDisplayLink(get_class($this), $this->GetKey(), $sAttCode)).", \n";
+ $oDocument->GetDisplayLink(get_class($this), $this->GetKey(), $sAttCode)).", \n";
$sDisplayValue .= "
".Dict::Format('UI:DownloadDocument_',
- $oDocument->GetDownloadLink(get_class($this), $this->GetKey(), $sAttCode)).", \n";
+ $oDocument->GetDownloadLink(get_class($this), $this->GetKey(), $sAttCode)).", \n";
}
else
{