mirror of
https://github.com/neovim/neovim
synced 2025-07-16 01:01:49 +00:00
vim-patch:9.1.0812: Coverity warns about dereferencing NULL ptr
Problem: Coverity warns about dereferencing NULL ptr
in check_colorcolumn()
Solution: verify that wp is not null before accessing it
related: vim/vim#15914
d0809869d6
Co-authored-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
@ -7384,10 +7384,10 @@ const char *check_colorcolumn(char *cc, win_T *wp)
|
||||
return NULL; // buffer was closed
|
||||
}
|
||||
|
||||
char *s;
|
||||
char *s = empty_string_option;
|
||||
if (cc != NULL) {
|
||||
s = cc;
|
||||
} else {
|
||||
} else if (wp != NULL) {
|
||||
s = wp->w_p_cc;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user