X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Fxml_match.c;h=7dddb6f07c5be722841e88b080b4aff97be11466;hp=9e14c49d07c5484d1ac7bba8bfe6422c494d6e0e;hb=a5043f3ecfd59cd1f788f982f475abdc11327997;hpb=b860b61a408af125d8f57f5a3a6d12844dff87ea diff --git a/src/xml_match.c b/src/xml_match.c index 9e14c49..7dddb6f 100644 --- a/src/xml_match.c +++ b/src/xml_match.c @@ -1,5 +1,5 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2013 Index Data + * Copyright (C) Index Data * See the file LICENSE for details. */ /** @@ -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; }