1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-11-03 19:37:16 -05:00

Handle missing real jid in OMEMO encrypted MUC

This should never happens since we should ensure MUC is Non-Anonymous
before enabling OMEMO.

But we should neither segfault if this happens.
This commit is contained in:
Paul Fariello 2019-04-17 11:47:54 +02:00
parent 3ef9123ccb
commit a6eb0d2c43

View File

@ -364,9 +364,13 @@ omemo_start_muc_sessions(const char *const roomjid)
GList *iter;
for (iter = roster; iter != NULL; iter = iter->next) {
Occupant *occupant = (Occupant *)iter->data;
Jid *jid = jid_create(occupant->jid);
omemo_start_session(jid->barejid);
jid_destroy(jid);
if (occupant->jid != NULL) {
Jid *jid = jid_create(occupant->jid);
omemo_start_session(jid->barejid);
jid_destroy(jid);
} else {
log_error("OMEMO: cannot get real jid for %s in %s", occupant->nick, roomjid);
}
}
g_list_free(roster);
}