summaryrefslogtreecommitdiffstats
path: root/src/option.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/option.c')
-rw-r--r--src/option.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/option.c b/src/option.c
index 0cea5586a8..b71830f743 100644
--- a/src/option.c
+++ b/src/option.c
@@ -10984,7 +10984,8 @@ has_format_option(x)
shortmess(x)
int x;
{
- return ( vim_strchr(p_shm, x) != NULL
+ return p_shm != NULL &&
+ ( vim_strchr(p_shm, x) != NULL
|| (vim_strchr(p_shm, 'a') != NULL
&& vim_strchr((char_u *)SHM_A, x) != NULL));
}