From 909b737289ee24f1c78c13c10d728a1cf990912d Mon Sep 17 00:00:00 2001 From: nicm Date: Tue, 15 Dec 2015 14:32:55 +0000 Subject: [PATCH] Copy state directly rather than dereferencing wl (which could be NULL). --- cmd-find.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd-find.c b/cmd-find.c index dbfe99ef..cf39240a 100644 --- a/cmd-find.c +++ b/cmd-find.c @@ -834,8 +834,8 @@ cmd_find_copy_state(struct cmd_find_state *dst, struct cmd_find_state *src) { dst->s = src->s; dst->wl = src->wl; - dst->idx = dst->wl->idx; - dst->w = dst->wl->window; + dst->idx = src->idx; + dst->w = src->w; dst->wp = src->wp; }