diff options
author | Andrew Hickman <andrew.hickman1@sky.com> | 2020-08-05 20:22:55 +0100 |
---|---|---|
committer | Andrew Hickman <andrew.hickman1@sky.com> | 2020-08-05 20:57:34 +0100 |
commit | 8ea9187aecf52854688c3509feb7cdff8623823e (patch) | |
tree | e7f115b746ba59f41d837eae61a13c229063ce52 | |
parent | c71321a099373753c22055921c8f538afed5ebb6 (diff) | |
download | libgit2-8ea9187aecf52854688c3509feb7cdff8623823e.tar.gz |
Fix `git_mwindow_scan_recently_used` spuriously returning true
-rw-r--r-- | src/mwindow.c | 6 |
1 files changed, 1 insertions, 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; |