Fix segfault in nick completion for non-connected MUCs

Co-authored-by: Roberto Santalla <roobre@roobre.es>
This commit is contained in:
fiaxh 2019-04-14 09:32:04 +02:00
parent 6e1938b089
commit 76c7dec75f

View file

@ -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);
}
}