yaz_pqf_parse_facet_list returns FAIL (0) for bad facet spec
authorAdam Dickmeiss <adam@indexdata.dk>
Wed, 10 Aug 2011 09:22:56 +0000 (11:22 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Wed, 10 Aug 2011 09:22:56 +0000 (11:22 +0200)
src/pquery.c

index a023d96..a0fde12 100644 (file)
@@ -888,7 +888,11 @@ Z_FacetList *yaz_pqf_parse_facet_list(ODR o, const char *qbuf)
         fl->elements = (Z_FacetField **)
             odr_malloc(o, num * sizeof(*fl->elements));
         for (i = 0; i < num; i++)
+        {
             fl->elements[i] = parse_facet(o, darray[i]);
+            if (!fl->elements[i])
+                return 0;
+        }
         return fl;
     }
     else