From 2a444fb2e4b3b7fb1c62b754e1796f499907f203 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. --- recctrl/marcread.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/recctrl/marcread.c b/recctrl/marcread.c index 42096f0..dfdffdc 100644 --- a/recctrl/marcread.c +++ b/recctrl/marcread.c @@ -1,4 +1,4 @@ -/* $Id: marcread.c,v 1.24.2.4 2006-08-14 10:39:16 adam Exp $ +/* $Id: marcread.c,v 1.24.2.5 2006-10-12 10:13:33 adam Exp $ Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004 Index Data Aps @@ -735,9 +735,12 @@ static void parse_data1_tree(struct grs_read_info *p, const char *mc_stmnt, logf(LOG_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