From 2fa987cd1138c46e8c8fc97df0ec72acae13538a Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Mon, 6 Jan 2025 11:40:59 -0500 Subject: [PATCH] Fix NPE (cherry picked from commit 5ae202766d99887b6a748dd0463124898a35bf3d) --- src/main/java/eu/siacs/conversations/entities/Conversation.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/eu/siacs/conversations/entities/Conversation.java b/src/main/java/eu/siacs/conversations/entities/Conversation.java index f9cfb6c4f..feb40e052 100644 --- a/src/main/java/eu/siacs/conversations/entities/Conversation.java +++ b/src/main/java/eu/siacs/conversations/entities/Conversation.java @@ -1561,7 +1561,7 @@ public class Conversation extends AbstractEntity implements Blockable, Comparabl final var script = locale.getScript(); for (final var m : messages) { if (getMode() != MODE_MULTI) { - final var resource = m.getCounterpart().getResource(); + final var resource = m.getCounterpart() == null ? null : m.getCounterpart().getResource(); if (resource != null && resource.length() < 10) { anyMatchSpam = true; return;