From a5043f3ecfd59cd1f788f982f475abdc11327997 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Fri, 6 Feb 2015 13:01:32 +0100 Subject: [PATCH] Fix 0 ptr reference for OPAC records from XML YAZ-822 --- src/xml_match.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/xml_match.c b/src/xml_match.c index 0a9019a..7dddb6f 100644 --- a/src/xml_match.c +++ b/src/xml_match.c @@ -16,7 +16,8 @@ int yaz_match_xsd_element(xmlNodePtr ptr, const char *elem) { - if (ptr->type == XML_ELEMENT_NODE && !xmlStrcmp(ptr->name, BAD_CAST elem)) + if (ptr && ptr->type == XML_ELEMENT_NODE && + !xmlStrcmp(ptr->name, BAD_CAST elem)) { return 1; } -- 1.7.10.4