diff options
Diffstat (limited to 'src/nvim/buffer.c')
-rw-r--r-- | src/nvim/buffer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c index a113cbcd5f..ea2ae016b9 100644 --- a/src/nvim/buffer.c +++ b/src/nvim/buffer.c @@ -343,7 +343,7 @@ open_buffer ( void set_bufref(bufref_T *bufref, buf_T *buf) { bufref->br_buf = buf; - bufref->br_fnum = buf->b_fnum; + bufref->br_fnum = buf == NULL ? 0 : buf->b_fnum; bufref->br_buf_free_count = buf_free_count; } |