Skip to content

Commit

Permalink
Only attempt to create a rendition if the source content input stream…
Browse files Browse the repository at this point in the history
… exists
  • Loading branch information
Paul Warren committed Aug 14, 2019
1 parent 17c1059 commit f9ad181
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,9 @@ public InputStream getRendition(Object entity, String mimeType) {
InputStream content = null;
try {
content = contentStore.getContent(entity);
return this.convert(fromMimeType, content, mimeType);
if (content != null) {
return this.convert(fromMimeType, content, mimeType);
}
}
catch (Exception e) {
LOGGER.error(String.format("Failed to get rendition from %s to %s", fromMimeType, mimeType), e);
Expand Down

0 comments on commit f9ad181

Please sign in to comment.