aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r--src/nvim/eval.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c
index f5cffbc3e1..ac0daa226a 100644
--- a/src/nvim/eval.c
+++ b/src/nvim/eval.c
@@ -7667,7 +7667,8 @@ static void f_assert_exception(typval_T *argvars, typval_T *rettv)
ga_concat(&ga, (char_u *)"v:exception is not set");
assert_error(&ga);
ga_clear(&ga);
- } else if (strstr((char *)vimvars[VV_EXCEPTION].vv_str, error) == NULL) {
+ } else if (error != NULL
+ && strstr((char *)vimvars[VV_EXCEPTION].vv_str, error) == NULL) {
prepare_assert_error(&ga);
fill_assert_error(&ga, &argvars[1], NULL, &argvars[0],
&vimvars[VV_EXCEPTION].vv_tv);