mirror of
https://github.com/tmux/tmux.git
synced 2025-01-07 16:28:48 +00:00
Do not attempt to close a NULL pane when failing to create a new one.
This commit is contained in:
parent
b21a9b1c4e
commit
c0d74661b7
@ -153,7 +153,6 @@ cmd_split_window_exec(struct cmd *self, struct cmdq_item *item)
|
|||||||
sc.flags |= SPAWN_DETACHED;
|
sc.flags |= SPAWN_DETACHED;
|
||||||
|
|
||||||
if ((new_wp = spawn_pane(&sc, &cause)) == NULL) {
|
if ((new_wp = spawn_pane(&sc, &cause)) == NULL) {
|
||||||
layout_close_pane(new_wp);
|
|
||||||
cmdq_error(item, "create pane failed: %s", cause);
|
cmdq_error(item, "create pane failed: %s", cause);
|
||||||
free(cause);
|
free(cause);
|
||||||
return (CMD_RETURN_ERROR);
|
return (CMD_RETURN_ERROR);
|
||||||
|
Loading…
Reference in New Issue
Block a user