aboutsummaryrefslogtreecommitdiff
path: root/cmd-new-window.c
diff options
context:
space:
mode:
Diffstat (limited to 'cmd-new-window.c')
-rw-r--r--cmd-new-window.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd-new-window.c b/cmd-new-window.c
index 4c9878ed..6517e99e 100644
--- a/cmd-new-window.c
+++ b/cmd-new-window.c
@@ -63,7 +63,7 @@ cmd_new_window_exec(struct cmd *self, struct cmdq_item *item)
struct environ_entry *envent;
struct cmd_find_state fs;
- if (args_has(args, 'a')) {
+ if (args_has(args, 'a') && wl != NULL) {
if ((idx = winlink_shuffle_up(s, wl)) == -1) {
cmdq_error(item, "no free window indexes");
return (CMD_RETURN_ERROR);