diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-09-29 21:45:41 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-09-29 21:45:41 +0200 |
commit | 1b9129809d8269acb8e7c79d8fc99c7976b4f76e (patch) | |
tree | c295744bdee425cdea4e00883d084957c1cb45ce /src/map.c | |
parent | f43e7ac4eee22dbb26fc069ec9a3d1598ec8dfe9 (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.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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]); |