don't crash when tabbing through muc user list with offline users

This commit is contained in:
Daniel Gultsch 2016-07-08 13:24:14 +02:00
parent cdee91363c
commit 57e51bc735

View File

@ -1369,8 +1369,9 @@ public class ConversationFragment extends Fragment implements EditMessage.Keyboa
} }
List<String> completions = new ArrayList<>(); List<String> completions = new ArrayList<>();
for(MucOptions.User user : conversation.getMucOptions().getUsers()) { for(MucOptions.User user : conversation.getMucOptions().getUsers()) {
if (user.getName().startsWith(incomplete)) { String name = user.getName();
completions.add(user.getName()+(firstWord ? ": " : " ")); if (name != null && name.startsWith(incomplete)) {
completions.add(name+(firstWord ? ": " : " "));
} }
} }
Collections.sort(completions); Collections.sort(completions);