summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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