Only make a thumbnail if the file exists

Stephen Paul Weber created

Change summary

src/main/java/eu/siacs/conversations/persistance/FileBackend.java | 2 
1 file changed, 1 insertion(+), 1 deletion(-)

Detailed changes

src/main/java/eu/siacs/conversations/persistance/FileBackend.java 🔗

@@ -1209,7 +1209,7 @@ public class FileBackend {
     public Drawable getThumbnail(DownloadableFile file, Resources res, int size, boolean cacheOnly, String cacheKey) throws IOException {
         final LruCache<String, Drawable> cache = mXmppConnectionService.getDrawableCache();
         Drawable thumbnail = cache.get(cacheKey);
-        if ((thumbnail == null) && (!cacheOnly)) {
+        if ((thumbnail == null) && (!cacheOnly) && file.exists()) {
             synchronized (THUMBNAIL_LOCK) {
                 thumbnail = cache.get(cacheKey);
                 if (thumbnail != null) {