Do not attempt to close a NULL pane when failing to create a new one.

pull/2123/head
nicm 2020-03-16 18:08:39 +00:00
parent 7021757c9d
commit fb396286ff
1 changed files with 0 additions and 1 deletions

View File

@ -154,7 +154,6 @@ cmd_split_window_exec(struct cmd *self, struct cmdq_item *item)
sc.flags |= SPAWN_DETACHED;
if ((new_wp = spawn_pane(&sc, &cause)) == NULL) {
layout_close_pane(new_wp);
cmdq_error(item, "create pane failed: %s", cause);
free(cause);
return (CMD_RETURN_ERROR);