From 40d14698b8acae34be18c8138f623f1739f55e14 Mon Sep 17 00:00:00 2001 From: Moxie Marlinspike Date: Fri, 9 Mar 2018 11:14:37 -0800 Subject: [PATCH] Fix NPE introduced by #6886 --- .../securesms/mms/IncomingLollipopMmsConnection.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/org/thoughtcrime/securesms/mms/IncomingLollipopMmsConnection.java b/src/org/thoughtcrime/securesms/mms/IncomingLollipopMmsConnection.java index 8a2c34066d..8891836ee0 100644 --- a/src/org/thoughtcrime/securesms/mms/IncomingLollipopMmsConnection.java +++ b/src/org/thoughtcrime/securesms/mms/IncomingLollipopMmsConnection.java @@ -95,6 +95,9 @@ public class IncomingLollipopMmsConnection extends LollipopMmsConnection impleme Log.w(TAG, baos.size() + "-byte response: ");// + Hex.dump(baos.toByteArray())); RetrieveConf retrieved = (RetrieveConf) new PduParser(baos.toByteArray()).parse(); + + if (retrieved == null) return null; + sendRetrievedAcknowledgement(transactionId, retrieved.getMmsVersion(), subscriptionId); return retrieved; } catch (IOException | TimeoutException e) {