aboutsummaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2016-07-08 13:24:14 +0200
committerDaniel Gultsch <daniel@gultsch.de>2016-07-08 13:24:14 +0200
commit57e51bc735abe92a60a8aeee09c6158d4c92694a (patch)
tree427e4e5fe4fe973e214609d703c473bda114bc9c /src/main
parentcdee91363c11b2eae920f7ebf443c022674fbb2c (diff)
don't crash when tabbing through muc user list with offline users
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/eu/siacs/conversations/ui/ConversationFragment.java5
1 files 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 6dfd3c2d..f400feb5 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<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);