From 8c3d50c6dc57abc513efbae6b73063be8103daa0 Mon Sep 17 00:00:00 2001 From: Greyson Parrelli Date: Tue, 30 Oct 2018 18:01:26 -0700 Subject: [PATCH] Ignore messages without content. --- src/org/thoughtcrime/securesms/jobs/PushDecryptJob.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/org/thoughtcrime/securesms/jobs/PushDecryptJob.java b/src/org/thoughtcrime/securesms/jobs/PushDecryptJob.java index 0fcf6175de..239fa401d9 100644 --- a/src/org/thoughtcrime/securesms/jobs/PushDecryptJob.java +++ b/src/org/thoughtcrime/securesms/jobs/PushDecryptJob.java @@ -6,6 +6,7 @@ import android.content.Context; import android.content.Intent; import android.os.Build; import android.support.annotation.NonNull; +import android.support.annotation.Nullable; import android.support.v4.app.NotificationCompat; import android.support.v4.app.NotificationManagerCompat; import android.util.Pair; @@ -1010,7 +1011,12 @@ public class PushDecryptJob extends ContextJob { } } - private boolean shouldIgnore(@NonNull SignalServiceContent content) { + private boolean shouldIgnore(@Nullable SignalServiceContent content) { + if (content == null) { + Log.w(TAG, "Got a message with null content."); + return true; + } + Recipient sender = Recipient.from(context, Address.fromExternal(context, content.getSender()), false); if (content.getDataMessage().isPresent()) {