summaryrefslogtreecommitdiffstats
path: root/src/map.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-09-29 21:45:41 +0200
committerBram Moolenaar <Bram@vim.org>2020-09-29 21:45:41 +0200
commit1b9129809d8269acb8e7c79d8fc99c7976b4f76e (patch)
treec295744bdee425cdea4e00883d084957c1cb45ce /src/map.c
parentf43e7ac4eee22dbb26fc069ec9a3d1598ec8dfe9 (diff)
patch 8.2.1773: crash when calling mapset() with a list as first argumentv8.2.1773
Problem: Crash when calling mapset() with a list as first argument. Solution: Check for NULL. (closes #7040)
Diffstat (limited to 'src/map.c')
-rw-r--r--src/map.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/map.c b/src/map.c
index eed3a55d04..6a994d4185 100644
--- a/src/map.c
+++ b/src/map.c
@@ -2304,6 +2304,8 @@ f_mapset(typval_T *argvars, typval_T *rettv UNUSED)
char_u *arg;
which = tv_get_string_buf_chk(&argvars[0], buf);
+ if (which == NULL)
+ return;
mode = get_map_mode(&which, 0);
is_abbr = (int)tv_get_number(&argvars[1]);