Fix bugs with empty panes and load-buffer -w, GitHub issue 5701 from

Alexandre Fiori.
This commit is contained in:
nicm
2026-10-08 07:06:26 +00:00
committed by tmux update bot
parent 9a92292029
commit cb44afd415
3 changed files with 10 additions and 6 deletions

View File

@@ -1,4 +1,4 @@
/* $OpenBSD: window.c,v 1.384 2026/10/02 12:48:52 nicm Exp $ */
/* $OpenBSD: window.c,v 1.385 2026/10/08 07:06:26 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -1585,9 +1585,11 @@ window_pane_destroy(struct window_pane *wp)
window_pane_free_modes(wp);
screen_write_sync_clear_dirty(wp);
if (wp->fd != -1) {
if (wp->event != NULL) {
bufferevent_free(wp->event);
wp->event = NULL;
}
if (wp->fd != -1) {
close(wp->fd);
wp->fd = -1;
}