summaryrefslogtreecommitdiff
path: root/src/parser.c
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2008-11-09 17:47:08 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2008-11-09 17:47:08 +0000
commitfd23949103aa8ec2c98ad3b209738617825e381d (patch)
tree530d36baa207496540212001b46337aadfb4e32e /src/parser.c
parent9c6e96d743c993f1b92f0cc2f07164d44780536e (diff)
downloadlibhubbub-fd23949103aa8ec2c98ad3b209738617825e381d.tar.gz
libhubbub-fd23949103aa8ec2c98ad3b209738617825e381d.tar.bz2
Return errors from treebuilder constructor/destructor
svn path=/trunk/hubbub/; revision=5665
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;