From 14bcfdd5c60a3dfe069c468c64164ed5ba0065f7 Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Sat, 5 May 2018 22:08:37 +0100 Subject: [PATCH] fix NPE --- src/components/views/messages/MImageBody.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/views/messages/MImageBody.js b/src/components/views/messages/MImageBody.js index a42e45c55d..b50b7a114c 100644 --- a/src/components/views/messages/MImageBody.js +++ b/src/components/views/messages/MImageBody.js @@ -161,7 +161,10 @@ export default class extends React.Component { return this.state.decryptedThumbnailUrl; } return this.state.decryptedUrl; - } else if (content.info.mimetype == "image/svg+xml" && content.info.thumbnail_url) { + } else if (content.info && + content.info.mimetype == "image/svg+xml" && + content.info.thumbnail_url) + { // special case to return client-generated thumbnails for SVGs, if any, // given we deliberately don't thumbnail them serverside to prevent // billion lol attacks and similar