diff options
author | lexborisov <lex.borisov@gmail.com> | 2016-12-07 17:13:58 +0300 |
---|---|---|
committer | lexborisov <lex.borisov@gmail.com> | 2016-12-07 17:13:58 +0300 |
commit | a0ed4bada52db3d311ae9f6449004b3d2dd5b929 (patch) | |
tree | a98c2458e63342f797de0ac849f34d1858c09205 /source/myhtml | |
parent | dcaef2dd5e733d8da75bcde5c29bec7a3ae08317 (diff) |
Fised: crashed in myhtml function myhtml_tag_get_by_name.
Diffstat (limited to 'source/myhtml')
-rw-r--r-- | source/myhtml/myhtml.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/myhtml/myhtml.c b/source/myhtml/myhtml.c index e651cb2..7edeaf1 100644 --- a/source/myhtml/myhtml.c +++ b/source/myhtml/myhtml.c @@ -418,6 +418,10 @@ myhtml_collection_t * myhtml_get_nodes_by_tag_id(myhtml_tree_t* tree, myhtml_col myhtml_collection_t * myhtml_get_nodes_by_name(myhtml_tree_t* tree, myhtml_collection_t *collection, const char* html, size_t length, myhtml_status_t *status) { const myhtml_tag_context_t *tag_ctx = myhtml_tag_get_by_name(tree->tags, html, length); + + if(tag_ctx == NULL) + return NULL; + return myhtml_get_nodes_by_tag_id(tree, collection, tag_ctx->id, status); } |