From cfca764d48d5d5a342cd9eefe2557970f09094a2 Mon Sep 17 00:00:00 2001 From: Phil Turnbull Date: Thu, 15 Jun 2017 07:47:16 -0400 Subject: [PATCH] Root can never be NULL in this context --- src/runtime/parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/parser.c b/src/runtime/parser.c index b54b8250..3026f76f 100644 --- a/src/runtime/parser.c +++ b/src/runtime/parser.c @@ -839,7 +839,7 @@ static void parser__accept(Parser *self, StackVersion version, if (parser__select_tree(self, self->finished_tree, root)) { ts_tree_release(self->finished_tree); - assert((root == NULL) || (root->ref_count > 0)); + assert(root && root->ref_count > 0); self->finished_tree = root; } else { ts_tree_release(root);