diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-09-04 23:41:42 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-09-04 23:41:42 +0200 |
commit | 030cddc7ec0c3d2fe3969140cd1b92b2f18633c0 (patch) | |
tree | b8ecedfd12545ad9b7a1a401ad0b0904570c360a /src/buffer.c | |
parent | 26b84339fd8766898bcf6a259cbc2e0c38689726 (diff) | |
download | vim-git-030cddc7ec0c3d2fe3969140cd1b92b2f18633c0.tar.gz |
patch 7.4.2330v7.4.2330
Problem: Coverity complains about not checking curwin to be NULL.
Solution: Use firstwin to avoid the warning.
Diffstat (limited to 'src/buffer.c')
-rw-r--r-- | src/buffer.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/buffer.c b/src/buffer.c index ac37685aa..398fee7b6 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -707,7 +707,7 @@ buf_freeall(buf_T *buf, int flags) int is_curbuf = (buf == curbuf); bufref_T bufref; # ifdef FEAT_WINDOWS - int is_curwin = (curwin!= NULL && curwin->w_buffer == buf); + int is_curwin = (curwin != NULL && curwin->w_buffer == buf); win_T *the_curwin = curwin; tabpage_T *the_curtab = curtab; # endif @@ -772,7 +772,7 @@ buf_freeall(buf_T *buf, int flags) #endif #ifdef FEAT_SYN_HL /* Remove any ownsyntax, unless exiting. */ - if (firstwin != NULL && curwin->w_buffer == buf) + if (curwin != NULL && curwin->w_buffer == buf) reset_synblock(curwin); #endif @@ -788,7 +788,7 @@ buf_freeall(buf_T *buf, int flags) clearFolding(win); } # else - if (curwin->w_buffer == buf) + if (curwin != NULL && curwin->w_buffer == buf) clearFolding(curwin); # endif #endif |