mirror of
https://github.com/neovim/neovim.git
synced 2025-09-13 14:58:18 +00:00
PVS/V595: pointer utilized before checking NULL
This commit is contained in:
@@ -1718,6 +1718,7 @@ buf_T * buflist_new(char_u *ffname, char_u *sfname, linenr_T lnum, int flags)
|
|||||||
*/
|
*/
|
||||||
buf = NULL;
|
buf = NULL;
|
||||||
if ((flags & BLN_CURBUF) && curbuf_reusable()) {
|
if ((flags & BLN_CURBUF) && curbuf_reusable()) {
|
||||||
|
assert(curbuf != NULL);
|
||||||
buf = curbuf;
|
buf = curbuf;
|
||||||
/* It's like this buffer is deleted. Watch out for autocommands that
|
/* It's like this buffer is deleted. Watch out for autocommands that
|
||||||
* change curbuf! If that happens, allocate a new buffer anyway. */
|
* change curbuf! If that happens, allocate a new buffer anyway. */
|
||||||
|
Reference in New Issue
Block a user