1
0
Fork 1

Fix crash when attachment mime null

This commit is contained in:
Arne 2024-08-16 08:27:56 +02:00
parent 40919d05ff
commit 4b73a33260

View file

@ -1663,7 +1663,7 @@ public class ConversationFragment extends XmppFragment
} else if (attachment.getType() == Attachment.Type.IMAGE) { } else if (attachment.getType() == Attachment.Type.IMAGE) {
Log.d(Config.LOGTAG, "ConversationsActivity.commitAttachments() - attaching image to conversations. CHOOSE_IMAGE"); Log.d(Config.LOGTAG, "ConversationsActivity.commitAttachments() - attaching image to conversations. CHOOSE_IMAGE");
attachImageToConversation(conversation, attachment.getUri(), attachment.getMime()); 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"); Log.d(Config.LOGTAG, "ConversationsActivity.commitAttachments() - attaching WebXDC to conversations. CHOOSE_FILE");
newSubThread(); newSubThread();
if (conversation.getNextEncryption() == Message.ENCRYPTION_AXOLOTL || conversation.getNextEncryption() == Message.ENCRYPTION_PGP || conversation.getNextEncryption() == Message.ENCRYPTION_OTR) { if (conversation.getNextEncryption() == Message.ENCRYPTION_AXOLOTL || conversation.getNextEncryption() == Message.ENCRYPTION_PGP || conversation.getNextEncryption() == Message.ENCRYPTION_OTR) {