summaryrefslogtreecommitdiffstats
path: root/cmd-select-window.c
diff options
context:
space:
mode:
authornicm <nicm>2020-10-19 06:39:28 +0000
committernicm <nicm>2020-10-19 06:39:28 +0000
commitd8cda9286ff1157ed46126bc4a797b08bb9436ae (patch)
treea2328b2e6974924d862561fb375b53d9efb46536 /cmd-select-window.c
parent4c8706d39977ca1f12b8980bcc168e0a24a3d0f7 (diff)
Client could be NULL in select-window (for example in .tmux.conf), do
not set latest session if so. GitHub issue 2429 from Han Boetes.
Diffstat (limited to 'cmd-select-window.c')
-rw-r--r--cmd-select-window.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd-select-window.c b/cmd-select-window.c
index c85f36be..8dd358b0 100644
--- a/cmd-select-window.c
+++ b/cmd-select-window.c
@@ -142,7 +142,7 @@ cmd_select_window_exec(struct cmd *self, struct cmdq_item *item)
}
cmdq_insert_hook(s, item, current, "after-select-window");
}
- if (c->session != NULL)
+ if (c != NULL && c->session != NULL)
s->curw->window->latest = c;
recalculate_sizes();