From cf4e14c74663304f7cf61f587963b91587b3034e Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Mon, 1 Apr 2019 03:05:03 +0200 Subject: clang/"null pointer dereference": insert_execute --- src/nvim/edit.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') 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 } -- cgit