mirror of
https://github.com/neovim/neovim.git
synced 2024-12-22 04:05:09 -07:00
fix(coverity/340720): error if nvim_eval_statusline given invalid winid
This commit is contained in:
parent
8f241e535f
commit
e850a92986
@ -2281,6 +2281,11 @@ Dictionary nvim_eval_statusline(String str, Dict(eval_statusline) *opts, Error *
|
||||
fillchar = ' ';
|
||||
} else {
|
||||
wp = find_window_by_handle(window, err);
|
||||
|
||||
if (wp == NULL) {
|
||||
api_set_error(err, kErrorTypeException, "unknown winid %d", window);
|
||||
return result;
|
||||
}
|
||||
ewp = wp;
|
||||
|
||||
if (fillchar == 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user