forked from aniani/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: #15914 Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
parent
2f6efaccfd
commit
d0809869d6
@ -704,6 +704,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
812,
|
||||
/**/
|
||||
811,
|
||||
/**/
|
||||
|
@ -7934,7 +7934,7 @@ check_colorcolumn(
|
||||
char_u *cc, // when NULL: use "wp->w_p_cc"
|
||||
win_T *wp) // when NULL: only parse "cc"
|
||||
{
|
||||
char_u *s;
|
||||
char_u *s = empty_option;
|
||||
int tw;
|
||||
int col;
|
||||
int count = 0;
|
||||
@ -7947,7 +7947,7 @@ check_colorcolumn(
|
||||
|
||||
if (cc != NULL)
|
||||
s = cc;
|
||||
else
|
||||
else if (wp != NULL)
|
||||
s = wp->w_p_cc;
|
||||
|
||||
if (wp != NULL)
|
||||
|
Loading…
x
Reference in New Issue
Block a user