diff options
Diffstat (limited to 'src/eu/siacs/conversations/persistance/FileBackend.java')
-rw-r--r-- | src/eu/siacs/conversations/persistance/FileBackend.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/eu/siacs/conversations/persistance/FileBackend.java b/src/eu/siacs/conversations/persistance/FileBackend.java index f7f986f2..7433946b 100644 --- a/src/eu/siacs/conversations/persistance/FileBackend.java +++ b/src/eu/siacs/conversations/persistance/FileBackend.java @@ -100,11 +100,14 @@ public class FileBackend { .decodeFile(getJingleFile(message).getAbsolutePath()); } - public Bitmap getThumbnailFromMessage(Message message, int size) { + public Bitmap getThumbnailFromMessage(Message message, int size) throws FileNotFoundException { Bitmap thumbnail = thumbnailCache.get(message.getUuid()); if (thumbnail==null) { Bitmap fullsize = BitmapFactory.decodeFile(getJingleFile(message) .getAbsolutePath()); + if (fullsize==null) { + throw new FileNotFoundException(); + } thumbnail = resize(fullsize, size); this.thumbnailCache.put(message.getUuid(), thumbnail); } |