diff --git a/src/main/java/eu/siacs/conversations/persistance/FileBackend.java b/src/main/java/eu/siacs/conversations/persistance/FileBackend.java index c1eb44865c..52359f5a79 100644 --- a/src/main/java/eu/siacs/conversations/persistance/FileBackend.java +++ b/src/main/java/eu/siacs/conversations/persistance/FileBackend.java @@ -677,6 +677,7 @@ public class FileBackend { cursor = mXmppConnectionService.getContentResolver().query(uri, null, null, null, null); if (cursor != null && cursor.moveToFirst()) { int sizeIndex = cursor.getColumnIndex(OpenableColumns.SIZE); + if (sizeIndex < 0) return 0; return cursor.getLong(sizeIndex); } } finally {