Fix segfault in nick completion for non-connected MUCs
Co-authored-by: Roberto Santalla <roobre@roobre.es>
This commit is contained in:
parent
6e1938b089
commit
76c7dec75f
|
@ -92,7 +92,7 @@ class OccupantsTabCompletor {
|
||||||
for (int i = messages.size - 1; i > 0; i--) {
|
for (int i = messages.size - 1; i > 0; i--) {
|
||||||
string resourcepart = messages[i].from.resourcepart;
|
string resourcepart = messages[i].from.resourcepart;
|
||||||
Jid? own_nick = stream_interactor.get_module(MucManager.IDENTITY).get_own_jid(conversation.counterpart, conversation.account);
|
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);
|
ret.add(resourcepart);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue