summaryrefslogtreecommitdiffstats
path: root/contrib/nvi
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>1999-09-14 14:34:58 +0000
committerru <ru@FreeBSD.org>1999-09-14 14:34:58 +0000
commit19b029502bceded1ac0dd3883ed78de887749be8 (patch)
treead71f9158998929d5b1b8a491c2ee70343f70a75 /contrib/nvi
parent5a8588bae904306ac141de414535209e45824c3c (diff)
downloadFreeBSD-src-19b029502bceded1ac0dd3883ed78de887749be8.zip
FreeBSD-src-19b029502bceded1ac0dd3883ed78de887749be8.tar.gz
Fix a coredump when commands in ~/.exrc prepended with addresses.
PR: 13000
Diffstat (limited to 'contrib/nvi')
-rw-r--r--contrib/nvi/ex/ex.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/contrib/nvi/ex/ex.c b/contrib/nvi/ex/ex.c
index f92d8f7..ecdae4b 100644
--- a/contrib/nvi/ex/ex.c
+++ b/contrib/nvi/ex/ex.c
@@ -7,6 +7,8 @@
* See the LICENSE file for redistribution information.
*/
+/* $FreeBSD$ */
+
#include "config.h"
#ifndef lint
@@ -2307,7 +2309,7 @@ ex_badaddr(sp, cp, ba, nret)
* underlying file, that's the real problem.
*/
if (sp->ep == NULL) {
- ex_emsg(sp, cp->name, EXM_NOFILEYET);
+ ex_emsg(sp, cp ? cp->name : NULL, EXM_NOFILEYET);
return;
}
OpenPOWER on IntegriCloud