From 902ca26856b54125ca773da753b1ea361f064f09 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sun, 21 Oct 2018 22:50:12 +0200 Subject: fix warning: null arg passed to 'nonnull' param Found by clang scan-build 5.0 --- src/nvim/ex_cmds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c index bce0c35f67..99f8963dad 100644 --- a/src/nvim/ex_cmds.c +++ b/src/nvim/ex_cmds.c @@ -3299,7 +3299,7 @@ static buf_T *do_sub(exarg_T *eap, proftime_T timeout, endcolumn = (curwin->w_curswant == MAXCOL); } - if (sub_joining_lines(eap, pat, sub, cmd, !preview)) { + if (sub != NULL && sub_joining_lines(eap, pat, sub, cmd, !preview)) { return NULL; } -- cgit