From 76c7dec75f052cfaf9c3b469ba9d658a71075b6b Mon Sep 17 00:00:00 2001 From: fiaxh Date: Sun, 14 Apr 2019 09:32:04 +0200 Subject: [PATCH] Fix segfault in nick completion for non-connected MUCs Co-authored-by: Roberto Santalla --- main/src/ui/chat_input/occupants_tab_completer.vala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } }