diff options
author | errt <[email protected]> | 2019-10-14 19:49:28 +0200 |
---|---|---|
committer | rbuj <[email protected]> | 2020-07-10 13:27:44 +0200 |
commit | 633b99b07bdc0fd9808fa0d38ab6bfb50a35dc90 (patch) | |
tree | fa989c3231c2506242d952dd4cccacc4a1f6418f | |
parent | ca62928529246b67234949b6f22705f4b76ae6a7 (diff) | |
download | atril-633b99b07bdc0fd9808fa0d38ab6bfb50a35dc90.tar.bz2 atril-633b99b07bdc0fd9808fa0d38ab6bfb50a35dc90.tar.xz |
Fix segfault on empty navMap
-rw-r--r-- | backend/epub/epub-document.c | 4 |
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(); |