From 7d179ce096c89963deae835327596de435e66cdf Mon Sep 17 00:00:00 2001 From: Toby Goodwin Date: Fri, 2 Mar 2018 06:06:51 +0000 Subject: nBody second child can be null --- tree.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'tree.c') 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 -- cgit v1.2.3