diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2019-04-01 03:05:03 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2019-04-01 03:05:02 +0200 |
commit | cf4e14c74663304f7cf61f587963b91587b3034e (patch) | |
tree | b4f7852c348b3ee53b57422dd54778c4731e5112 | |
parent | e32c9f888bf63427c923e2f6621d582e95680c70 (diff) | |
download | rneovim-cf4e14c74663304f7cf61f587963b91587b3034e.tar.gz rneovim-cf4e14c74663304f7cf61f587963b91587b3034e.tar.bz2 rneovim-cf4e14c74663304f7cf61f587963b91587b3034e.zip |
clang/"null pointer dereference": insert_execute
-rw-r--r-- | src/nvim/edit.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c index e6d9dcf092..1814e9d3d4 100644 --- a/src/nvim/edit.c +++ b/src/nvim/edit.c @@ -667,8 +667,9 @@ static int insert_execute(VimState *state, int key) // there is nothing to add, CTRL-L works like CTRL-P then. if (s->c == Ctrl_L && (!CTRL_X_MODE_LINE_OR_EVAL(ctrl_x_mode) - || (int)STRLEN(compl_shown_match->cp_str) - > curwin->w_cursor.col - compl_col)) { + || (compl_shown_match->cp_str != NULL + && (int)STRLEN(compl_shown_match->cp_str) + > curwin->w_cursor.col - compl_col))) { ins_compl_addfrommatch(); return 1; // continue } |