Skip to content

Commit

Permalink
Bug: 13653 Sanity check that we have a valid MIME part.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrubinsk committed Oct 30, 2014
1 parent 852e84e commit c09ffb3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions imp/lib/Contents.php
Expand Up @@ -1122,6 +1122,9 @@ public function canDisplay($part, $mask, $type = null)
if (!is_object($part)) {
$part = $this->getMIMEPart($part, array('nocontents' => true));
}
if (!$part) {
return 0;
}
$viewer = $GLOBALS['injector']->getInstance('IMP_Factory_MimeViewer')->create($part, array('contents' => $this, 'type' => $type));

if ($mask & self::RENDER_INLINE_AUTO) {
Expand Down

0 comments on commit c09ffb3

Please sign in to comment.