mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
bugfix: destroying attr objects immediately after pthread_create
This commit is contained in:
1
djvu.c
1
djvu.c
@@ -535,6 +535,7 @@ static int reflowPage(lua_State *L) {
|
||||
pthread_attr_init(&attr);
|
||||
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
|
||||
pthread_create(&rf_thread, &attr, k2pdfopt_reflow_bmp, (void*) kctx);
|
||||
pthread_attr_destroy(&attr);
|
||||
} else {
|
||||
k2pdfopt_reflow_bmp(kctx);
|
||||
}
|
||||
|
||||
1
pdf.c
1
pdf.c
@@ -619,6 +619,7 @@ static int reflowPage(lua_State *L) {
|
||||
pthread_attr_init(&attr);
|
||||
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
|
||||
pthread_create( &rf_thread, &attr, k2pdfopt_reflow_bmp, (void*) kctx);
|
||||
pthread_attr_destroy(&attr);
|
||||
} else {
|
||||
k2pdfopt_reflow_bmp(kctx);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user