diff --git a/bin/ksh/c_sh.c b/bin/ksh/c_sh.c index 150a507b6dd9..67b98220abd4 100644 --- a/bin/ksh/c_sh.c +++ b/bin/ksh/c_sh.c @@ -1,4 +1,4 @@ -/* $NetBSD: c_sh.c,v 1.10 2005/06/26 19:09:00 christos Exp $ */ +/* $NetBSD: c_sh.c,v 1.11 2006/03/18 07:24:40 christos Exp $ */ /* * built-in Bourne commands @@ -6,7 +6,7 @@ #include #ifndef lint -__RCSID("$NetBSD: c_sh.c,v 1.10 2005/06/26 19:09:00 christos Exp $"); +__RCSID("$NetBSD: c_sh.c,v 1.11 2006/03/18 07:24:40 christos Exp $"); #endif @@ -616,7 +616,8 @@ c_brkcont(wp) * shall be used. Doesn't say to print an error but we * do anyway 'cause the user messed up. */ - last_ep->flags &= ~EF_BRKCONT_PASS; + if (last_ep) + last_ep->flags &= ~EF_BRKCONT_PASS; warningf(TRUE, "%s: can only %s %d level(s)", wp[0], wp[0], n - quit); }