summaryrefslogtreecommitdiff
path: root/src/book.vala
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2024-07-21 19:58:31 +0200
committerJörg Frings-Fürst <debian@jff.email>2024-07-21 19:58:31 +0200
commit5a514d891db203b803a37c2110184f537fcd5608 (patch)
tree0c85f179d5cfeb471f3227bd4a94998e3aaf4ee1 /src/book.vala
parent408791709f23be34de957320384d02b228ea488f (diff)
parent35c7b263d4fc6910be51005193095cfbdeaa969a (diff)
Merge branch 'release/debian/46.0-1'HEADdebian/46.0-1master
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++)