mirror of
https://github.com/tmux/tmux.git
synced 2024-12-13 01:48:47 +00:00
Do not double free window if pane fails to start.
This commit is contained in:
parent
4ff7bc3eb3
commit
cf30e0f935
4
spawn.c
4
spawn.c
@ -172,10 +172,8 @@ spawn_window(struct spawn_context *sc, char **cause)
|
||||
/* Spawn the pane. */
|
||||
wp = spawn_pane(sc, cause);
|
||||
if (wp == NULL) {
|
||||
if (~sc->flags & SPAWN_RESPAWN) {
|
||||
window_destroy(w);
|
||||
if (~sc->flags & SPAWN_RESPAWN)
|
||||
winlink_remove(&s->windows, sc->wl);
|
||||
}
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
|
1
tmux.h
1
tmux.h
@ -2362,7 +2362,6 @@ struct window *window_find_by_id_str(const char *);
|
||||
struct window *window_find_by_id(u_int);
|
||||
void window_update_activity(struct window *);
|
||||
struct window *window_create(u_int, u_int);
|
||||
void window_destroy(struct window *);
|
||||
void window_pane_set_event(struct window_pane *);
|
||||
struct window_pane *window_get_active_at(struct window *, u_int, u_int);
|
||||
struct window_pane *window_find_string(struct window *, const char *);
|
||||
|
Loading…
Reference in New Issue
Block a user