summaryrefslogtreecommitdiff
path: root/tree.c
diff options
context:
space:
mode:
authorToby Goodwin <toby@paccrat.org>2018-03-02 06:06:51 +0000
committerToby Goodwin <toby@paccrat.org>2018-03-02 06:06:51 +0000
commit7d179ce096c89963deae835327596de435e66cdf (patch)
tree4eb42cc7d0164c5c8f726cee0cdb1d6fd521c5a9 /tree.c
parent5b624196125034b95d504be682127a5964e08da5 (diff)
nBody second child can be null
Diffstat (limited to 'tree.c')
-rw-r--r--tree.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/tree.c b/tree.c
index 54c2013..6a79bbc 100644
--- a/tree.c
+++ b/tree.c
@@ -60,8 +60,7 @@ extern Node *mk(int /*nodetype*/ t,...) {
break;
}
n->type = t;
- if (t == nBody &&
- n->u[1].p->type == nIfnot) {
+ if (t == nBody && n->u[1].p && n->u[1].p->type == nIfnot) {
if (n->u[0].p->type == nIf) {
fprint(2, "here i am!\n");
} else