aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/main/java/de/pixart/messenger/persistance/FileBackend.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/persistance/FileBackend.java b/src/main/java/de/pixart/messenger/persistance/FileBackend.java
index 6b35219e4..0c3028feb 100644
--- a/src/main/java/de/pixart/messenger/persistance/FileBackend.java
+++ b/src/main/java/de/pixart/messenger/persistance/FileBackend.java
@@ -367,7 +367,12 @@ public class FileBackend {
private String getExtensionFromUri(Uri uri) {
String[] projection = {MediaStore.MediaColumns.DATA};
String filename = null;
- Cursor cursor = mXmppConnectionService.getContentResolver().query(uri, projection, null, null, null);
+ Cursor cursor;
+ try {
+ cursor = mXmppConnectionService.getContentResolver().query(uri, projection, null, null, null);
+ } catch (IllegalArgumentException e) {
+ cursor = null;
+ }
if (cursor != null) {
try {
if (cursor.moveToFirst()) {