Fixes for coverity warnings.
diff --git a/src/ex_getln.c b/src/ex_getln.c
index b292f63..790d531 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -3780,7 +3780,7 @@
 
     /* '>' 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;