summaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
authorerrt <[email protected]>2019-10-14 19:49:28 +0200
committerrbuj <[email protected]>2020-07-10 13:27:44 +0200
commit633b99b07bdc0fd9808fa0d38ab6bfb50a35dc90 (patch)
treefa989c3231c2506242d952dd4cccacc4a1f6418f /backend
parentca62928529246b67234949b6f22705f4b76ae6a7 (diff)
downloadatril-633b99b07bdc0fd9808fa0d38ab6bfb50a35dc90.tar.bz2
atril-633b99b07bdc0fd9808fa0d38ab6bfb50a35dc90.tar.xz
Fix segfault on empty navMap
Diffstat (limited to 'backend')
-rw-r--r--backend/epub/epub-document.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/backend/epub/epub-document.c b/backend/epub/epub-document.c
index a45fe935..2f4eab0f 100644
--- a/backend/epub/epub-document.c
+++ b/backend/epub/epub-document.c
@@ -1267,7 +1267,7 @@ setup_document_index(EpubDocument *epub_document,gchar *containeruri)
xmlNodePtr navPoint = xmlretval;
- do {
+ while(navPoint != NULL) {
if ( !xmlStrcmp(navPoint->name,(xmlChar*)"navPoint")) {
xmlretval = NULL;
@@ -1315,7 +1315,7 @@ setup_document_index(EpubDocument *epub_document,gchar *containeruri)
navPoint = navPoint->next;
- } while(navPoint != NULL);
+ }
xml_free_doc();