From 99b53df9fc6876748f53aec935a2354886099fc4 Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Fri, 13 Jan 2023 19:10:10 -0500 Subject: [PATCH] Fix NPE --- src/main/java/eu/siacs/conversations/entities/Message.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/eu/siacs/conversations/entities/Message.java b/src/main/java/eu/siacs/conversations/entities/Message.java index 5c6f263af..e43755c90 100644 --- a/src/main/java/eu/siacs/conversations/entities/Message.java +++ b/src/main/java/eu/siacs/conversations/entities/Message.java @@ -1280,12 +1280,13 @@ public class Message extends AbstractEntity implements AvatarService.Avatarable public boolean equals(Object o) { if (!(o instanceof FileParams)) return false; + if (url == null) return false; return url.equals(((FileParams) o).url); } public int hashCode() { - return url.hashCode(); + return url == null ? super.hashCode() : url.hashCode(); } } -- 2.45.2