From 4b73a33260ee9788cf46eac85867922dface19fc Mon Sep 17 00:00:00 2001 From: Arne Date: Fri, 16 Aug 2024 08:27:56 +0200 Subject: [PATCH] Fix crash when attachment mime null --- .../java/eu/siacs/conversations/ui/ConversationFragment.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java index b9fc84026..c57d33075 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java +++ b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java @@ -1663,7 +1663,7 @@ public class ConversationFragment extends XmppFragment } else if (attachment.getType() == Attachment.Type.IMAGE) { Log.d(Config.LOGTAG, "ConversationsActivity.commitAttachments() - attaching image to conversations. CHOOSE_IMAGE"); attachImageToConversation(conversation, attachment.getUri(), attachment.getMime()); - } else if (attachment.getMime().equals("application/xdc+zip")) { + } else if (attachment.getMime() != null && attachment.getMime().equals("application/xdc+zip")) { Log.d(Config.LOGTAG, "ConversationsActivity.commitAttachments() - attaching WebXDC to conversations. CHOOSE_FILE"); newSubThread(); if (conversation.getNextEncryption() == Message.ENCRYPTION_AXOLOTL || conversation.getNextEncryption() == Message.ENCRYPTION_PGP || conversation.getNextEncryption() == Message.ENCRYPTION_OTR) {