diff options
author | fiaxh <git@lightrise.org> | 2019-04-14 09:32:04 +0200 |
---|---|---|
committer | fiaxh <git@lightrise.org> | 2019-04-14 09:46:54 +0200 |
commit | 76c7dec75f052cfaf9c3b469ba9d658a71075b6b (patch) | |
tree | a823c6823918ba209c75eb2e9dcfa05478ff1047 | |
parent | 6e1938b0893b47f0673bd773bdbfdbf6465ae018 (diff) | |
download | dino-76c7dec75f052cfaf9c3b469ba9d658a71075b6b.tar.gz dino-76c7dec75f052cfaf9c3b469ba9d658a71075b6b.zip |
Fix segfault in nick completion for non-connected MUCs
Co-authored-by: Roberto Santalla <roobre@roobre.es>
-rw-r--r-- | main/src/ui/chat_input/occupants_tab_completer.vala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/main/src/ui/chat_input/occupants_tab_completer.vala b/main/src/ui/chat_input/occupants_tab_completer.vala index b9f5cd45..fb9b2377 100644 --- a/main/src/ui/chat_input/occupants_tab_completer.vala +++ b/main/src/ui/chat_input/occupants_tab_completer.vala @@ -92,7 +92,7 @@ class OccupantsTabCompletor { for (int i = messages.size - 1; i > 0; i--) { string resourcepart = messages[i].from.resourcepart; Jid? own_nick = stream_interactor.get_module(MucManager.IDENTITY).get_own_jid(conversation.counterpart, conversation.account); - if (resourcepart != null && resourcepart != "" && resourcepart != own_nick.resourcepart && !ret.contains(resourcepart)) { + if (resourcepart != null && resourcepart != "" && (own_nick == null || resourcepart != own_nick.resourcepart) && !ret.contains(resourcepart)) { ret.add(resourcepart); } } |