mirror of
https://github.com/weechat/weechat.git
synced 2026-06-12 14:14:48 +02:00
Fix crash with /upgrade (problem when closing buffers)
This commit is contained in:
@@ -3247,6 +3247,8 @@ command_upgrade (void *data, struct t_gui_buffer *buffer,
|
||||
exec_args[0] = ptr_binary;
|
||||
exec_args[3] = strdup (weechat_home);
|
||||
|
||||
weechat_quit = 1;
|
||||
|
||||
/* save layout, unload plugins, save config, then upgrade */
|
||||
gui_layout_save_on_exit ();
|
||||
plugin_end ();
|
||||
|
||||
@@ -1404,7 +1404,7 @@ gui_buffer_close (struct t_gui_buffer *buffer)
|
||||
window is displaying buffer, or buffer # - 1 */
|
||||
ptr_buffer_visited = NULL;
|
||||
if (CONFIG_BOOLEAN(config_look_jump_previous_buffer_when_closing)
|
||||
&& (gui_current_window->buffer == buffer))
|
||||
&& gui_current_window && (gui_current_window->buffer == buffer))
|
||||
{
|
||||
index = gui_buffer_visited_get_index_previous ();
|
||||
if (index >= 0)
|
||||
|
||||
Reference in New Issue
Block a user