summaryrefslogtreecommitdiff
path: root/src/book.vala
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2024-06-30 20:46:13 +0200
committerJörg Frings-Fürst <debian@jff.email>2024-06-30 20:46:13 +0200
commit9b3a82a302bd88c64bb714b009d223f8683f7178 (patch)
tree9c387fef03143f2f5f809672bf51e6495f874050 /src/book.vala
parenta675d0fb9f307b714d0b9cf19690d2b08b666d7c (diff)
parentbca1cc8681bbaf662dabc961f84b06adc1255e08 (diff)
Merge branch 'feature/upstream' into develop
Diffstat (limited to 'src/book.vala')
-rw-r--r--src/book.vala11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/book.vala b/src/book.vala
index e25eb35..7f8d048 100644
--- a/src/book.vala
+++ b/src/book.vala
@@ -237,7 +237,8 @@ private class BookSaver
encoder = new ThreadPool<EncodeTask>.with_owned_data (encode_delegate, (int) get_num_processors (), false);
/* Configure a writer */
- ThreadFunc<Error?>? write_delegate = null;
+ Thread<Error?> writer;
+
switch (mime_type)
{
case "image/jpeg":
@@ -245,13 +246,15 @@ private class BookSaver
#if HAVE_WEBP
case "image/webp":
#endif
- write_delegate = write_multifile;
+ writer = new Thread<Error?> (null, write_multifile);
break;
case "application/pdf":
- write_delegate = write_pdf;
+ writer = new Thread<Error?> (null, write_pdf);
+ break;
+ default:
+ writer = new Thread<Error?> (null, () => null);
break;
}
- var writer = new Thread<Error?> (null, write_delegate);
/* Issue encode tasks */
for (var i = 0; i < n_pages; i++)