summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2018-05-09 07:50:04 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2018-05-09 07:50:04 +0000
commit3f7b80d9b2be981498d4814bf2fe78543bfa5b40 (patch)
tree55744b69e9d7b25ad38dc77c03acac4d2ca9a052
parent588b23861393535a70b901fe156560716e16b4d9 (diff)
Another check for NULL window if looking for index.
-rw-r--r--usr.bin/tmux/cmd-find.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/tmux/cmd-find.c b/usr.bin/tmux/cmd-find.c
index c93f8e46f62..827d5b1e953 100644
--- a/usr.bin/tmux/cmd-find.c
+++ b/usr.bin/tmux/cmd-find.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-find.c,v 1.63 2018/05/04 08:21:42 nicm Exp $ */
+/* $OpenBSD: cmd-find.c,v 1.64 2018/05/09 07:50:03 nicm Exp $ */
/*
* Copyright (c) 2015 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -1159,7 +1159,8 @@ cmd_find_target(struct cmd_find_state *fs, struct cmdq_item *item,
/* This will fill in winlink and window. */
if (cmd_find_get_window_with_session(fs, window) != 0)
goto no_window;
- fs->wp = fs->wl->window->active;
+ if (fs->wl != NULL) /* can be NULL if index only */
+ fs->wp = fs->wl->window->active;
goto found;
}