From 9040d4abe6fe0fc2820f224baf8c538716b02ea0 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Sat, 24 Feb 2007 16:47:16 +0000 Subject: [PATCH] Deal with two common places for corrupt Explain database --- index/zinfo.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/index/zinfo.c b/index/zinfo.c index 01a8bdd..9086b6c 100644 --- a/index/zinfo.c +++ b/index/zinfo.c @@ -1,4 +1,4 @@ -/* $Id: zinfo.c,v 1.76 2007-01-15 15:10:17 adam Exp $ +/* $Id: zinfo.c,v 1.77 2007-02-24 16:47:16 adam Exp $ Copyright (C) 1995-2007 Index Data ApS @@ -409,11 +409,23 @@ ZebraExplainInfo zebraExplain_open( #endif node_tgtinfo = data1_search_tag(zei->dh, zei->data1_target, "/targetInfo"); + if (!node_tgtinfo) + { + yaz_log(YLOG_FATAL, "Node node_tgtinfo missing"); + nmem_destroy(zei->nmem); + return 0; + } zebraExplain_mergeAccessInfo(zei, node_tgtinfo, &zei->accessInfo); node_zebra = data1_search_tag(zei->dh, node_tgtinfo->child, "zebraInfo"); + if (!node_zebra) + { + yaz_log(YLOG_FATAL, "Node node_zebra missing"); + nmem_destroy(zei->nmem); + return 0; + } np = 0; if (node_zebra) { -- 1.7.10.4