From b4ca56d96dcf0fe14150115a8826206710d0567a Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Fri, 12 Apr 2019 00:41:20 +0200 Subject: PVS/V595: pointer utilized before checking NULL --- src/nvim/buffer.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/nvim/buffer.c') diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c index 703a89d31f..d7a16de299 100644 --- a/src/nvim/buffer.c +++ b/src/nvim/buffer.c @@ -1718,6 +1718,7 @@ buf_T * buflist_new(char_u *ffname, char_u *sfname, linenr_T lnum, int flags) */ buf = NULL; if ((flags & BLN_CURBUF) && curbuf_reusable()) { + assert(curbuf != NULL); buf = curbuf; /* It's like this buffer is deleted. Watch out for autocommands that * change curbuf! If that happens, allocate a new buffer anyway. */ -- cgit