From 6da9773bbfccf13935b642cb0541a499fc4f71c3 Mon Sep 17 00:00:00 2001 From: Boris Grozev Date: Mon, 30 Jan 2023 11:19:58 -0600 Subject: [PATCH] Add null check for mucUser. XEP-0045 requires "unavailable" presence to contain extended presence, but Smack shouldn't throw an exception if it doesn't. --- .../main/java/org/jivesoftware/smackx/muc/MultiUserChat.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/MultiUserChat.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/MultiUserChat.java index 2c6316854..632c8e0cf 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/MultiUserChat.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/MultiUserChat.java @@ -276,7 +276,7 @@ public class MultiUserChat { } } - Destroy destroy = mucUser.getDestroy(); + Destroy destroy = mucUser == null ? null : mucUser.getDestroy(); // The room has been destroyed. if (destroy != null) { EntityBareJid alternateMucJid = destroy.getJid();