diff src/ex_getln.c @ 2445:04dae202d316 vim73

Fixes for coverity warnings.
author Bram Moolenaar <bram@vim.org>
date Sat, 31 Jul 2010 16:44:19 +0200
parents 98b9a6b9e7d5
children a847363bf06e
line wrap: on
line diff
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -3780,7 +3780,7 @@ vim_strsave_fnameescape(fname, shell)
 
     /* '>' and '+' are special at the start of some commands, e.g. ":edit" and
      * ":write".  "cd -" has a special meaning. */
-    if (*p == '>' || *p == '+' || (*p == '-' && p[1] == NUL))
+    if (p != NULL && (*p == '>' || *p == '+' || (*p == '-' && p[1] == NUL)))
 	escape_fname(&p);
 
     return p;