diff options
author | Bram Moolenaar <Bram@vim.org> | 2023-02-15 14:26:25 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2023-02-15 14:26:25 +0000 |
commit | 339e114d70de3ec2b36edf37d7ba7a7cfdf9d1a6 (patch) | |
tree | 1ec594b0d2603f50ceb760fddbb8c0ceb6455a2d /src/option.c | |
parent | fdbd14e89207dca95549f298ee468793da852086 (diff) |
patch 9.0.1311: Coverity warns for using a NULL pointerv9.0.1311
Problem: Coverity warns for using a NULL pointer.
Solution: Use "empty_option" instead of NULL.
Diffstat (limited to 'src/option.c')
-rw-r--r-- | src/option.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/option.c b/src/option.c index 717812c9ce..1b581ed355 100644 --- a/src/option.c +++ b/src/option.c @@ -1990,6 +1990,8 @@ do_set_option_string( // Set the new value. *(char_u **)(varp) = newval; + if (newval == NULL) + *(char_u **)(varp) = empty_option; #if defined(FEAT_EVAL) if (!starting |