diff options
author | lexborisov <lex.borisov@gmail.com> | 2016-10-14 17:42:01 +0300 |
---|---|---|
committer | lexborisov <lex.borisov@gmail.com> | 2016-10-14 17:42:01 +0300 |
commit | 221b3ae461432b7a0b799df9da60f2c2b3d70ba2 (patch) | |
tree | 7c514879fc456b1d03ea67746215ad0ef38d47fe /source/myhtml | |
parent | f9c33fae868d7bbccd513906be5ac1a47e578c04 (diff) |
Fixed problem with myhtml threads
Diffstat (limited to 'source/myhtml')
-rw-r--r-- | source/myhtml/myhtml.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source/myhtml/myhtml.c b/source/myhtml/myhtml.c index bcdbb7f..e651cb2 100644 --- a/source/myhtml/myhtml.c +++ b/source/myhtml/myhtml.c @@ -137,9 +137,14 @@ myhtml_t* myhtml_destroy(myhtml_t* myhtml) if(myhtml->thread) { #ifndef MyHTML_BUILD_WITHOUT_THREADS - mythread_queue_list_destroy(myhtml->thread->context); + mythread_queue_list_t* queue_list = myhtml->thread->context; +#endif + + myhtml->thread = mythread_destroy(myhtml->thread, mythread_queue_wait_all_for_done, true); + +#ifndef MyHTML_BUILD_WITHOUT_THREADS + mythread_queue_list_destroy(queue_list); #endif - mythread_destroy(myhtml->thread, mythread_queue_wait_all_for_done, true); } myhtml_tokenizer_state_destroy(myhtml); |