1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-12 14:14:48 +02:00

core: fix crash with /eval when the current buffer is closed in a command

This commit is contained in:
Sébastien Helleu
2026-03-13 23:11:00 +01:00
parent 916c59d8f0
commit 27ae6ca789
2 changed files with 11 additions and 0 deletions
+1
View File
@@ -14,6 +14,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
### Fixed
- core: fix crash with /eval when the current buffer is closed in a command
- core: fix buffer size in function util_parse_time, causing buffer overflow error in unit tests
- irc: fix unit of server option `anti_flood` from seconds to milliseconds in output of `/server listfull`
- irc: fix creation of irc.msgbuffer option without a server name
+10
View File
@@ -2469,6 +2469,16 @@ COMMAND_CALLBACK(eval)
{
for (ptr_command = commands; *ptr_command; ptr_command++)
{
if (!gui_buffer_valid (buffer))
{
buffer = gui_current_window->buffer;
if (pointers)
{
hashtable_set (pointers, "window",
gui_window_search_with_buffer (buffer));
hashtable_set (pointers, "buffer", buffer);
}
}
result = eval_expression (*ptr_command, pointers, NULL,
options);
if (result)