diff options
author | Michael Vetter <jubalh@iodoru.org> | 2021-03-25 16:47:35 +0100 |
---|---|---|
committer | Michael Vetter <jubalh@iodoru.org> | 2021-03-25 16:47:35 +0100 |
commit | 3a6bce5a099fff74f1a2b0bc84f38ef88bc84fef (patch) | |
tree | b0d8964d599928ee613716ac7cdc6677451a33b9 /src/event | |
parent | 901f9d3d8cc7b1196ed72427e51ff1b137d02e71 (diff) | |
download | profani-tty-3a6bce5a099fff74f1a2b0bc84f38ef88bc84fef.tar.gz |
event: make log_database_get_previous_chat safer
Diffstat (limited to 'src/event')
-rw-r--r-- | src/event/server_events.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/event/server_events.c b/src/event/server_events.c index 152c0ac6..c1fe381c 100644 --- a/src/event/server_events.c +++ b/src/event/server_events.c @@ -373,8 +373,10 @@ sv_ev_room_message(ProfMessage* message) if (prefs_do_room_notify(is_current, mucwin->roomjid, mynick, message->from_jid->resourcepart, message->plain, mention, triggers != NULL)) { Jid* jidp = jid_create(mucwin->roomjid); - notify_room_message(message->from_jid->resourcepart, jidp->localpart, num, message->plain); - jid_destroy(jidp); + if (jidp) { + notify_room_message(message->from_jid->resourcepart, jidp->localpart, num, message->plain); + jid_destroy(jidp); + } } if (triggers) { |