From b7109e9ebb1137926bd8e5cb31634e2ba075c287 Mon Sep 17 00:00:00 2001 From: Moxie Marlinspike Date: Wed, 13 Sep 2017 16:38:02 -0700 Subject: [PATCH] Fix for NPE if MMS notification has no transaction ID // FREEBIE --- src/org/thoughtcrime/securesms/jobs/MmsDownloadJob.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/org/thoughtcrime/securesms/jobs/MmsDownloadJob.java b/src/org/thoughtcrime/securesms/jobs/MmsDownloadJob.java index c98c8c9c2e..01a85e3450 100644 --- a/src/org/thoughtcrime/securesms/jobs/MmsDownloadJob.java +++ b/src/org/thoughtcrime/securesms/jobs/MmsDownloadJob.java @@ -103,7 +103,11 @@ public class MmsDownloadJob extends MasterSecretJob { byte[] transactionId = new byte[0]; try { - transactionId = notification.get().getTransactionId().getBytes(CharacterSets.MIMENAME_ISO_8859_1); + if (notification.get().getTransactionId() != null) { + transactionId = notification.get().getTransactionId().getBytes(CharacterSets.MIMENAME_ISO_8859_1); + } else { + Log.w(TAG, "No transaction ID!"); + } } catch (UnsupportedEncodingException e) { Log.w(TAG, e); }