vim-patch:7.4.2330

Problem:    Coverity complains about not checking curwin to be NULL.
Solution:   Use firstwin to avoid the warning.

030cddc7ec
This commit is contained in:
lonerover 2017-03-23 22:54:30 +08:00
parent 20e7652b69
commit 85ba14af6a
2 changed files with 5 additions and 4 deletions

View File

@ -627,10 +627,11 @@ void buf_freeall(buf_T *buf, int flags)
*/
if (buf == curbuf && !is_curbuf)
return;
diff_buf_delete(buf); /* Can't use 'diff' for unloaded buffer. */
/* Remove any ownsyntax, unless exiting. */
if (firstwin != NULL && curwin->w_buffer == buf)
diff_buf_delete(buf); // Can't use 'diff' for unloaded buffer.
// Remove any ownsyntax, unless exiting.
if (curwin != NULL && curwin->w_buffer == buf) {
reset_synblock(curwin);
}
/* No folds in an empty buffer. */
FOR_ALL_TAB_WINDOWS(tp, win) {

View File

@ -111,7 +111,7 @@ static int included_patches[] = {
2333,
// 2332 NA
2331,
// 2330,
2330,
2329,
2328,
// 2327 NA