diff --git a/src/main/java/eu/siacs/conversations/ui/util/Attachment.java b/src/main/java/eu/siacs/conversations/ui/util/Attachment.java index f994955d0..9c6849ce6 100644 --- a/src/main/java/eu/siacs/conversations/ui/util/Attachment.java +++ b/src/main/java/eu/siacs/conversations/ui/util/Attachment.java @@ -139,6 +139,9 @@ public class Attachment implements Parcelable { public static List of(final Context context, List uris, final String type) { final List attachments = new ArrayList<>(); for (final Uri uri : uris) { + if (uri == null) { + continue; + } final String mime = MimeUtils.guessMimeTypeFromUriAndMime(context, uri, type); attachments.add(new Attachment(uri, mime != null && isImage(mime) ? Type.IMAGE : Type.FILE, mime)); }