From 423f609828884a8b363e33433b6a03103c214865 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sat, 5 Oct 2024 07:48:22 +0200 Subject: [PATCH] irc: fix crash on /list buffer when a filter is set (closes #2197) --- CHANGELOG.md | 1 + src/plugins/irc/irc-list.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a10704658..9999acedb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ - core, plugins: fix integer overflow in loops ([#2178](https://github.com/weechat/weechat/issues/2178)), [CVE-2024-46613](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-46613)) - irc: decode IRC colors only when displaying messages in buffer, store nick info with IRC colors (host, account, real name) - irc: do not strip trailing spaces from incoming IRC messages +- irc: fix crash on /list buffer when a filter is set ([#2197](https://github.com/weechat/weechat/issues/2197)) - relay/api: fix empty nicklist in remote buffers after connection or reconnection - lua: fix compilation on Fedora with Lua < 5.2.0 ([#2173](https://github.com/weechat/weechat/issues/2173), [#2174](https://github.com/weechat/weechat/issues/2174)) - core: fix build on Android ([#2180](https://github.com/weechat/weechat/issues/2180)) diff --git a/src/plugins/irc/irc-list.c b/src/plugins/irc/irc-list.c index 4d4f12ace..369365cec 100644 --- a/src/plugins/irc/irc-list.c +++ b/src/plugins/irc/irc-list.c @@ -506,6 +506,12 @@ irc_list_display_line (struct t_irc_server *server, int line) ptr_channel = (struct t_irc_list_channel *)weechat_arraylist_get ( server->list->filter_channels, line); + if (!ptr_channel) + { + weechat_printf_y (server->list->buffer, line, ""); + return; + } + /* line color */ if (line == server->list->selected_line) {