mirror of
https://github.com/profanity-im/profanity.git
synced 2024-11-03 19:37:16 -05:00
Prevent segfault in sv_ev_incoming_message()
Regards https://github.com/profanity-im/profanity/issues/1488
Actually I would have loved to see the stanza that caused the segfault
since I'm not entirely sure whether this actually means that we do
something wrong earlier on.
Right now I don't know why the to_jid should be empty.
Let's prevent the segfault for now and see whether we get further
bugreports later.
Segfaulting issue got introduced with dd566d8d56
.
This commit is contained in:
parent
f025bceda3
commit
8190301a67
@ -600,7 +600,9 @@ sv_ev_incoming_message(ProfMessage* message)
|
||||
if (message->is_mam) {
|
||||
char* mybarejid = connection_get_barejid();
|
||||
if (g_strcmp0(mybarejid, message->from_jid->barejid) == 0) {
|
||||
looking_for_jid = message->to_jid->barejid;
|
||||
if (message->to_jid) {
|
||||
looking_for_jid = message->to_jid->barejid;
|
||||
}
|
||||
}
|
||||
free(mybarejid);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user