make sure preview prop is instanceof OC_Image before using it in showPreview

This commit is contained in:
Georg Ehrke 2014-09-21 17:30:29 +02:00
parent 69726d951e
commit 071e4bfc06
1 changed files with 3 additions and 1 deletions

View File

@ -548,8 +548,10 @@ class Preview {
if (is_null($this->preview)) { if (is_null($this->preview)) {
$this->getPreview(); $this->getPreview();
} }
if ($this->preview instanceof \OC_Image) {
$this->preview->show($mimeType); $this->preview->show($mimeType);
} }
}
/** /**
* resize, crop and fix orientation * resize, crop and fix orientation