Fixed bug #931: lem 'zebra::index::field' hangs if not specified 'storeKeys: 1' in...
[idzebra-moved-to-github.git] / index / mod_dom.c
index a2e83c7..131c09a 100644 (file)
@@ -1,5 +1,5 @@
 
-/* $Id: mod_dom.c,v 1.27 2007-03-05 13:02:11 marc Exp $
+/* $Id: mod_dom.c,v 1.29 2007-03-06 12:09:44 adam Exp $
    Copyright (C) 1995-2007
    Index Data ApS
 
@@ -363,7 +363,7 @@ static ZEBRA_RES perform_convert(struct filter_info *tinfo,
         *doc = xmlParseMemory((const char *) buf_out, len_out);
 
         /* writing debug info out */
-        if (extctr->flagShowRecords)
+        if (extctr && extctr->flagShowRecords)
             yaz_log(YLOG_LOG, "%s: XSLT %s\n %.*s", 
                     tinfo->fname ? tinfo->fname : "(none)", 
                     convert->stylesheet,
@@ -1157,12 +1157,12 @@ static int extract_xml_split(struct filter_info *tinfo,
         if (type == XML_READER_TYPE_ELEMENT && 
             input->u.xmlreader.split_level == depth)
         {
+            xmlNodePtr ptr;
+
             /* per default do not ingest record */
             tinfo->record_info_invoked = 0;
-
-           xmlNodePtr ptr
-                = xmlTextReaderExpand(input->u.xmlreader.reader);
-
+            
+            ptr = xmlTextReaderExpand(input->u.xmlreader.reader);
             if (ptr)
                 {
                 /* we have a new document */