aboutsummaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2019-04-14 09:32:04 +0200
committerfiaxh <git@lightrise.org>2019-04-14 09:46:54 +0200
commit76c7dec75f052cfaf9c3b469ba9d658a71075b6b (patch)
treea823c6823918ba209c75eb2e9dcfa05478ff1047 /main
parent6e1938b0893b47f0673bd773bdbfdbf6465ae018 (diff)
downloaddino-76c7dec75f052cfaf9c3b469ba9d658a71075b6b.tar.gz
dino-76c7dec75f052cfaf9c3b469ba9d658a71075b6b.zip
Fix segfault in nick completion for non-connected MUCs
Co-authored-by: Roberto Santalla <roobre@roobre.es>
Diffstat (limited to 'main')
-rw-r--r--main/src/ui/chat_input/occupants_tab_completer.vala2
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);
}
}