From fc3612a5ee6f16b5752dfb6b7b8acb2f0bbafa52 Mon Sep 17 00:00:00 2001 From: Arne Date: Fri, 13 Sep 2024 22:12:50 +0200 Subject: [PATCH] Fix crash when showing this thread only and send a message --- src/main/java/eu/siacs/conversations/entities/Message.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/entities/Message.java b/src/main/java/eu/siacs/conversations/entities/Message.java index 50e4b25c4..7b3554633 100644 --- a/src/main/java/eu/siacs/conversations/entities/Message.java +++ b/src/main/java/eu/siacs/conversations/entities/Message.java @@ -685,8 +685,10 @@ public class Message extends AbstractEntity implements AvatarService.Avatarable if (this.payloads == null) return null; for (Element el : this.payloads) { - if (el.getName().equals("thread") && el.getNamespace().equals("jabber:client")) { - return el; + if (el.getName() != null && el.getNamespace() != null) { + if (el.getName().equals("thread") && el.getNamespace().equals("jabber:client")) { + return el; + } } }