From 17f768ee9e8f572eece1ebda874e1b90cc0b9422 Mon Sep 17 00:00:00 2001 From: Ihor Antonov Date: Tue, 27 Aug 2019 16:28:42 -0400 Subject: clang/"null pointer dereference" #10864 --- src/nvim/edit.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/nvim/edit.c b/src/nvim/edit.c index 52efd72797..1d795621e5 100644 --- a/src/nvim/edit.c +++ b/src/nvim/edit.c @@ -674,7 +674,8 @@ 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) - || (compl_shown_match->cp_str != NULL + || (compl_shown_match != NULL + && compl_shown_match->cp_str != NULL && (int)STRLEN(compl_shown_match->cp_str) > curwin->w_cursor.col - compl_col))) { ins_compl_addfrommatch(); -- cgit