aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/persistance/FileBackend.java
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel.gultsch@rwth-aachen.de>2014-04-18 11:57:28 +0200
committerDaniel Gultsch <daniel.gultsch@rwth-aachen.de>2014-04-18 11:57:28 +0200
commit1e5f916b2a61b90c610614178bcd4c971817c83d (patch)
treef80061b8dfe12cb89ca4774e66df15818d03ddb8 /src/eu/siacs/conversations/persistance/FileBackend.java
parent8cc72b5a56569803296bf8970a06a4706fadd0e1 (diff)
tried to avoid some more race conditions in jingle
Diffstat (limited to '')
-rw-r--r--src/eu/siacs/conversations/persistance/FileBackend.java5
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);
}