From fa2de335b2e9e5bee959e273319e97ef6be0676a Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Thu, 12 Oct 2006 10:13:33 +0000 Subject: [PATCH] Fix crash that occurred if mc-ldr rules was used in conjunction with missing .mar file. --- index/marcread.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/index/marcread.c b/index/marcread.c index 93abbc5..67065bf 100644 --- a/index/marcread.c +++ b/index/marcread.c @@ -1,4 +1,4 @@ -/* $Id: marcread.c,v 1.3 2006-08-22 13:39:27 adam Exp $ +/* $Id: marcread.c,v 1.4 2006-10-12 10:13:33 adam Exp $ Copyright (C) 1995-2006 Index Data ApS @@ -736,9 +736,12 @@ static void parse_data1_tree(struct grs_read_info *p, const char *mc_stmnt, yaz_log(YLOG_LOG,"parse_data1_tree(): try LEADER from {%d} to {%d} positions", pf->interval.start, pf->interval.end); #endif - new = data1_mk_tag_n(p->dh, p->mem, mc_stmnt, strlen(mc_stmnt), 0, top); - data1_mk_text_n(p->dh, p->mem, marctab->leader+pf->interval.start, - pf->interval.end-pf->interval.start+1, new); + if (marctab) + { + new = data1_mk_tag_n(p->dh, p->mem, mc_stmnt, strlen(mc_stmnt), 0, top); + data1_mk_text_n(p->dh, p->mem, marctab->leader+pf->interval.start, + pf->interval.end-pf->interval.start+1, new); + } } else { -- 1.7.10.4