fix warning: null arg passed to 'nonnull' param

Found by clang scan-build 5.0
This commit is contained in:
Justin M. Keyes 2018-10-21 22:50:12 +02:00
parent f97496a21c
commit 902ca26856

View File

@ -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;
}