aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/ui
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2016-07-08 13:24:14 +0200
committerChristian Schneppe <christian@pix-art.de>2016-07-09 09:47:55 +0200
commit4bd73edd50d8298ad78c4859e90bdbb61617fa04 (patch)
treef486fd47c8b3c208b627f6e44af347c50c7365cf /src/main/java/eu/siacs/conversations/ui
parent9115a30bb60d863361ea6828aaf756319de697ee (diff)
don't crash when tabbing through muc user list with offline users
Diffstat (limited to 'src/main/java/eu/siacs/conversations/ui')
-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 336f2abe6..4c122da1c 100644
--- a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
+++ b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
@@ -1380,8 +1380,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);