X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fsession.c;h=61f7e54ebd1c8de77f28c73eb144438b1d6d1fba;hb=705f49b5a94dcdba10bba40a3f63d312ebbc054c;hp=5302971975a7bdc665a18a3679f2d26617d2d187;hpb=781dc14fa1b1efde27ef3befcb2da7ca84045eae;p=pazpar2-moved-to-github.git diff --git a/src/session.c b/src/session.c index 5302971..61f7e54 100644 --- a/src/session.c +++ b/src/session.c @@ -981,7 +981,10 @@ static int get_mergekey_from_doc(xmlDoc *doc, xmlNode *root, const char *name, if (!strcmp((const char *) n->name, "metadata")) { xmlChar *type = xmlGetProp(n, (xmlChar *) "type"); - if (!strcmp(name, (const char *) type)) + if (type == NULL) { + yaz_log(YLOG_FATAL, "Missing type attribute on metadata element. Skipping!"); + } + else if (!strcmp(name, (const char *) type)) { xmlChar *value = xmlNodeListGetString(doc, n->children, 1); if (value)