From a9ec66719f47835003a7cb90701db7b0113003ec Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber <singpolyma@singpolyma.net> Date: Mon, 18 Nov 2024 15:24:50 -0500 Subject: [PATCH] If the size column isn't there then we don't know (cherry picked from commit d7f58e94f1dc59dad10f82c2ba751484ffaa1616) --- .../java/eu/siacs/conversations/persistance/FileBackend.java | 1 + 1 file changed, 1 insertion(+) 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 {