From 57e51bc735abe92a60a8aeee09c6158d4c92694a Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Fri, 8 Jul 2016 13:24:14 +0200 Subject: [PATCH] don't crash when tabbing through muc user list with offline users --- .../java/eu/siacs/conversations/ui/ConversationFragment.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java index 6dfd3c2dd..f400feb59 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java +++ b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java @@ -1369,8 +1369,9 @@ public class ConversationFragment extends Fragment implements EditMessage.Keyboa } List completions = new ArrayList<>(); for(MucOptions.User user : conversation.getMucOptions().getUsers()) { - if (user.getName().startsWith(incomplete)) { - completions.add(user.getName()+(firstWord ? ": " : " ")); + String name = user.getName(); + if (name != null && name.startsWith(incomplete)) { + completions.add(name+(firstWord ? ": " : " ")); } } Collections.sort(completions);