Fix segfault

Fix segfault in myhtml_tree_node_clone if node->token is NULL
This commit is contained in:
Кирилл Жумарин 2018-05-13 01:27:53 +03:00 committed by GitHub
parent 87d75c9585
commit a6bb9b3232
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -516,7 +516,8 @@ myhtml_tree_node_t * myhtml_tree_node_clone(myhtml_tree_node_t* node)
{
myhtml_tree_node_t* new_node = myhtml_tree_node_create(node->tree);
myhtml_token_node_wait_for_done(node->tree->token, node->token);
if(node->token)
myhtml_token_node_wait_for_done(node->tree->token, node->token);
new_node->token = myhtml_token_node_clone(node->tree->token, node->token,
node->tree->mcasync_rules_token_id,