From 1f65f1bc80d77111bb89c63db910a805c57f3f99 Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Thu, 15 Nov 2012 19:13:13 +0400 Subject: [PATCH] eitd/xmlutil.cpp: fix crash, if epg data saved with older image - item/item_description can be present and break parsing --- src/eitd/xmlutil.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/eitd/xmlutil.cpp b/src/eitd/xmlutil.cpp index c57cfa023..b700011f3 100644 --- a/src/eitd/xmlutil.cpp +++ b/src/eitd/xmlutil.cpp @@ -334,16 +334,18 @@ void *insertEventsfromFile(void * data) std::string(xmlGetAttribute(node, "string"))); node = node->xmlNextNode; } -#ifdef USE_ITEM_DESCRIPTION while (xmlGetNextOccurence(node, "item") != NULL) { +#ifdef USE_ITEM_DESCRIPTION e.item = std::string(xmlGetAttribute(node, "string")); +#endif node = node->xmlNextNode; } while (xmlGetNextOccurence(node, "item_description") != NULL) { +#ifdef USE_ITEM_DESCRIPTION e.itemDescription = std::string(xmlGetAttribute(node, "string")); +#endif node = node->xmlNextNode; } -#endif while (xmlGetNextOccurence(node, "extended_text") != NULL) { e.appendExtendedText( std::string(ZapitTools::UTF8_to_Latin1(xmlGetAttribute(node, "lang"))), std::string(xmlGetAttribute(node, "string")));