From: Adam Dickmeiss Date: Fri, 31 Mar 1995 10:43:03 +0000 (+0000) Subject: More robust when getting bad MARC records. X-Git-Tag: IRTCL.1.4~318 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=be1b9d924ecf20a599f6c026b3973b494aebac6d;p=ir-tcl-moved-to-github.git More robust when getting bad MARC records. --- diff --git a/ir-tcl.c b/ir-tcl.c index 4136cfa..d805d62 100644 --- a/ir-tcl.c +++ b/ir-tcl.c @@ -4,7 +4,10 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: ir-tcl.c,v $ - * Revision 1.21 1995-03-31 08:56:37 adam + * Revision 1.22 1995-03-31 10:43:03 adam + * More robust when getting bad MARC records. + * + * Revision 1.21 1995/03/31 08:56:37 adam * New button "Search". * * Revision 1.20 1995/03/29 16:07:09 adam @@ -1043,6 +1046,8 @@ static int get_marc_fields(Tcl_Interp *interp, Iso2709Rec rec, Iso2709Anchor a; char *data; + if (!rec) + return TCL_OK; a = iso2709_a_mk (rec); while (iso2709_a_search (a, argv[4], argv[5], argv[6])) { @@ -1066,6 +1071,8 @@ static int get_marc_lines(Tcl_Interp *interp, Iso2709Rec rec, char *data; char *ptag = ""; + if (!rec) + return TCL_OK; a = iso2709_a_mk (rec); while (iso2709_a_search (a, argv[4], argv[5], argv[6])) {