diff options
| author | Jilles Tjoelker <jilles@FreeBSD.org> | 2013-01-13 19:26:33 +0000 |
|---|---|---|
| committer | Jilles Tjoelker <jilles@FreeBSD.org> | 2013-01-13 19:26:33 +0000 |
| commit | 31d396587e83d6820aa1de3a2084f68d39d9fdaf (patch) | |
| tree | 289101361f287af8f559b92b67fa233539afef78 /bin/sh/parser.c | |
| parent | 2c090c7168eb9be9232176845bf0d93261122110 (diff) | |
Notes
Diffstat (limited to 'bin/sh/parser.c')
| -rw-r--r-- | bin/sh/parser.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/sh/parser.c b/bin/sh/parser.c index a19ca3127bd3..665b53ff5aae 100644 --- a/bin/sh/parser.c +++ b/bin/sh/parser.c @@ -240,9 +240,9 @@ list(int nlflag, int erflag) n2 = andor(); tok = readtoken(); if (tok == TBACKGND) { - if (n2->type == NPIPE) { + if (n2 != NULL && n2->type == NPIPE) { n2->npipe.backgnd = 1; - } else if (n2->type == NREDIR) { + } else if (n2 != NULL && n2->type == NREDIR) { n2->type = NBACKGND; } else { n3 = (union node *)stalloc(sizeof (struct nredir)); |
