summaryrefslogtreecommitdiff
path: root/src/parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/parser.c')
-rw-r--r--src/parser.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/parser.c b/src/parser.c
index b67e9d1..9ca7bdf 100644
--- a/src/parser.c
+++ b/src/parser.c
@@ -80,12 +80,12 @@ hubbub_parser *hubbub_parser_create(const char *enc, bool fix_enc,
return NULL; ///
}
- parser->tb = hubbub_treebuilder_create(parser->tok, alloc, pw);
- if (parser->tb == NULL) {
+ error = hubbub_treebuilder_create(parser->tok, alloc, pw, &parser->tb);
+ if (error != HUBBUB_OK) {
hubbub_tokeniser_destroy(parser->tok);
parserutils_inputstream_destroy(parser->stream);
alloc(parser, 0, pw);
- return NULL;
+ return NULL; ///
}
parser->alloc = alloc;