diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2023-02-22 20:38:56 +0100 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2023-02-22 20:38:56 +0100 |
commit | fb0248f5572f9f8c5727731c5d065459238c0eeb (patch) | |
tree | b8b1b7e7261e522fd6a34323188005bab6f5f78d | |
parent | f6fdecb846439e57f0f07b97bdebb521b21fca97 (diff) | |
download | weechat-fb0248f5572f9f8c5727731c5d065459238c0eeb.zip |
core: fix crash in case of NULL message sent to function gui_chat_printf_y_date_tags (closes #1883)
-rw-r--r-- | ChangeLog.adoc | 1 | ||||
-rw-r--r-- | src/gui/gui-chat.c | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/ChangeLog.adoc b/ChangeLog.adoc index eb37a4f0f..22fee35f5 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -31,6 +31,7 @@ New features:: Bug fixes:: + * core: fix crash in case of NULL message sent to function gui_chat_printf_y_date_tags (issue #1883) * core: allow command `/input move_next_word` going to the end of line (issue #1881) * core: ignore incomplete ctrl/meta/meta2 codes in keys * core: fix display glitch in command errors when a wide char is set in option weechat.look.command_chars (issue #1871) diff --git a/src/gui/gui-chat.c b/src/gui/gui-chat.c index 7b89f2a0f..6841b95ff 100644 --- a/src/gui/gui-chat.c +++ b/src/gui/gui-chat.c @@ -906,6 +906,9 @@ gui_chat_printf_y_date_tags (struct t_gui_buffer *buffer, int y, time_t date, time_t date_printed; int i, last_y, num_lines_to_add; + if (!message) + return; + if (gui_init_ok && !gui_chat_buffer_valid (buffer, GUI_BUFFER_TYPE_FREE)) return; |