summaryrefslogtreecommitdiff
path: root/src/optionstr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/optionstr.c')
-rw-r--r--src/optionstr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/optionstr.c b/src/optionstr.c
index af4b749f2..1cf1ee9df 100644
--- a/src/optionstr.c
+++ b/src/optionstr.c
@@ -500,7 +500,7 @@ set_string_option(
if (is_hidden_option(opt_idx)) // don't set hidden option
return NULL;
- s = vim_strsave(value);
+ s = vim_strsave(value == NULL ? (char_u *)"" : value);
if (s != NULL)
{
varp = (char_u **)get_option_varp_scope(opt_idx,