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
1 changed files with 3 additions and 2 deletions

View File

@ -1369,8 +1369,9 @@ public class ConversationFragment extends Fragment implements EditMessage.Keyboa
}
List<String> 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);