summaryrefslogtreecommitdiffstats
path: root/src/ex_cmds.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ex_cmds.c')
-rw-r--r--src/ex_cmds.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index aeb2bf952d..919aafc7cc 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -7861,6 +7861,11 @@ ex_sign(exarg_T *eap)
{ /* ... not currently in a window */
char_u *cmd;
+ if (buf->b_fname == NULL)
+ {
+ EMSG(_("E934: Cannot jump to a buffer that does not have a name"));
+ return;
+ }
cmd = alloc((unsigned)STRLEN(buf->b_fname) + 25);
if (cmd == NULL)
return;