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:
@@ -6,6 +6,12 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
# WeeChat ChangeLog
|
||||
|
||||
## Version 4.8.3 (under dev)
|
||||
|
||||
### Fixed
|
||||
|
||||
- core: fix crash with `/eval` when the current buffer is closed in a command
|
||||
|
||||
## Version 4.8.2 (2026-03-06)
|
||||
|
||||
### Fixed
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user