diff options
Diffstat (limited to 'backend')
-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 38ab4c83..d3fdf586 100644 --- a/backend/epub/epub-document.c +++ b/backend/epub/epub-document.c @@ -1044,7 +1044,7 @@ setup_document_content_list(const gchar* content_uri, GError** error,gchar *docu } if ( xmlStrcmp(itemrefptr->name,(xmlChar*)"itemref") == 0) { - contentListNode *newnode = g_malloc0(sizeof(newnode)); + contentListNode *newnode = g_malloc0(sizeof(*newnode)); newnode->key = (gchar*)xml_get_data_from_node(itemrefptr,XML_ATTRIBUTE,(xmlChar*)"idref"); if ( newnode->key == NULL ) { @@ -1626,7 +1626,7 @@ page_set_function(linknode *Link, GList *contentList) contentListNode *pagedata; guint flag=0; - while (!flag) { + while (!flag && listiter) { pagedata = listiter->data; if (link_present_on_page(Link->pagelink, pagedata->value)) { flag=1; |