diff --git a/backend/epub/epub-document.c b/backend/epub/epub-document.c index 57d626c4..c772494b 100644 --- a/backend/epub/epub-document.c +++ b/backend/epub/epub-document.c @@ -616,10 +616,12 @@ xml_get_data_from_node(xmlNodePtr node, xmlChar* attributename) { xmlChar* datastring ; + if ( node == NULL ) + return NULL; if ( rettype == XML_ATTRIBUTE ) - datastring= xmlGetProp(node,attributename); + datastring= xmlGetProp(node,attributename); else - datastring= xmlNodeListGetString(xmldocument,node->xmlChildrenNode, 1); + datastring= xmlNodeListGetString(xmldocument,node->xmlChildrenNode, 1); return datastring; }