From 5a38ecdab3b4a198ec3cb709437ac03767f92f01 Mon Sep 17 00:00:00 2001 From: Nicolas Mailloux Date: Sat, 16 Jul 2022 14:45:01 -0400 Subject: [PATCH] reader: Fix PDF segmentation fault bug on page turn This bug happened sometimes when the user would go to a specific page in the document or tried to continue reading a PDF from a certain page other than the first one. This commit fixes this that. --- reader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reader.cpp b/reader.cpp index 9a72750..717fc96 100644 --- a/reader.cpp +++ b/reader.cpp @@ -910,7 +910,7 @@ int reader::setup_book(QString book, int i, bool run_parser) { } // Reading files - if(is_epub == false) { + if(is_epub == false && is_pdf == false && is_image == false) { if(run_parser == true) { QDirIterator it("/inkbox/book/split"); while (it.hasNext()) {