fix(coverity/340720): error if nvim_eval_statusline given invalid winid

This commit is contained in:
James McCoy 2022-01-19 21:53:49 -05:00
parent 8f241e535f
commit e850a92986
No known key found for this signature in database
GPG Key ID: DFE691AE331BA3DB

View File

@ -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) {