diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-08-17 22:29:09 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-08-17 22:29:09 +0200 |
commit | bfd096d02087a10e8e2f4bdfb74e0435506fa8bb (patch) | |
tree | 5ae40d74396c8c0ade0f33230b5b8c813aeac8b1 /src/ex_cmds.c | |
parent | af9c4c9b5761c4c074237d87e2c95713bf721eab (diff) | |
download | vim-git-bfd096d02087a10e8e2f4bdfb74e0435506fa8bb.tar.gz |
patch 7.4.2225v7.4.2225
Problem: Crash when placing a sign in a deleted buffer.
Solution: Check for missing buffer name. (Dominique Pelle). Add a test.
Diffstat (limited to 'src/ex_cmds.c')
-rw-r--r-- | src/ex_cmds.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ex_cmds.c b/src/ex_cmds.c index aeb2bf952..919aafc7c 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; |