From 8ea9187aecf52854688c3509feb7cdff8623823e Mon Sep 17 00:00:00 2001 From: Andrew Hickman Date: Wed, 5 Aug 2020 20:22:55 +0100 Subject: Fix `git_mwindow_scan_recently_used` spuriously returning true --- src/mwindow.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/mwindow.c b/src/mwindow.c index c257f0c71..bb28e20fd 100644 --- a/src/mwindow.c +++ b/src/mwindow.c @@ -201,10 +201,6 @@ static bool git_mwindow_scan_recently_used( assert(mwf); assert(out_window); - lru_window = *out_window; - if (out_last) - lru_last = *out_last; - for (w_last = NULL, w = mwf->windows; w; w_last = w, w = w->next) { if (w->inuse_cnt) { if (only_unused) @@ -226,7 +222,7 @@ static bool git_mwindow_scan_recently_used( } } - if (!lru_window && !lru_last) + if (!lru_window) return false; *out_window = lru_window; -- cgit v1.2.1