summaryrefslogtreecommitdiffstats
path: root/cmd-find.c
diff options
context:
space:
mode:
Diffstat (limited to 'cmd-find.c')
-rw-r--r--cmd-find.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd-find.c b/cmd-find.c
index a2f9aa4e..46551e2d 100644
--- a/cmd-find.c
+++ b/cmd-find.c
@@ -227,7 +227,7 @@ cmd_find_best_winlink_with_window(struct cmd_find_state *fs)
struct winlink *wl, *wl_loop;
wl = NULL;
- if (fs->s->curw->window == fs->w)
+ if (fs->s->curw != NULL && fs->s->curw->window == fs->w)
wl = fs->s->curw;
else {
RB_FOREACH(wl_loop, winlinks, &fs->s->windows) {