From f104b4119aad28e8c2f04312d0faf93a25076945 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sun, 2 Jun 2024 22:49:41 +0200 Subject: [PATCH] irc: don't return pointer to irc server if the channel or nick is not found in info "irc_buffer" --- CHANGELOG.md | 1 + src/plugins/irc/irc-info.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1da3cd24c..a327a9616 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,7 @@ ### Fixed +- irc: don't return pointer to irc server if the channel or nick is not found in info "irc_buffer" - irc: close /list buffer when the server buffer is closed ([#2121](https://github.com/weechat/weechat/issues/2121)) - xfer: fix send of data on the DCC chat buffer after `/upgrade` if the buffer was opened before the upgrade ([#2092](https://github.com/weechat/weechat/issues/2092)) - php: fix return value of function hdata_longlong diff --git a/src/plugins/irc/irc-info.c b/src/plugins/irc/irc-info.c index abdee08d1..f9bb60149 100644 --- a/src/plugins/irc/irc-info.c +++ b/src/plugins/irc/irc-info.c @@ -298,7 +298,11 @@ irc_info_info_irc_buffer_cb (const void *pointer, void *data, /* search for server or channel buffer */ if (server && ptr_server && channel) + { ptr_channel = irc_channel_search (ptr_server, channel); + if (!ptr_channel) + ptr_server = NULL; + } free (server); free (channel);