From 633b99b07bdc0fd9808fa0d38ab6bfb50a35dc90 Mon Sep 17 00:00:00 2001 From: errt Date: Mon, 14 Oct 2019 19:49:28 +0200 Subject: Fix segfault on empty navMap --- backend/epub/epub-document.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'backend/epub') 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(); -- cgit v1.2.1