Change summary
src/main/java/eu/siacs/conversations/persistance/FileBackend.java | 3 +
1 file changed, 3 insertions(+)
Detailed changes
@@ -137,6 +137,9 @@ public class FileBackend {
options.inJustDecodeBounds = true;
try {
BitmapFactory.decodeStream(mXmppConnectionService.getContentResolver().openInputStream(uri), null, options);
+ if (options == null || options.outMimeType == null) {
+ return false;
+ }
return (options.outWidth <= Config.IMAGE_SIZE && options.outHeight <= Config.IMAGE_SIZE && options.outMimeType.contains(Config.IMAGE_FORMAT.name().toLowerCase()));
} catch (FileNotFoundException e) {
return false;