X-Git-Url: https://git.dlugolecki.net.pl/?a=blobdiff_plain;f=gom%2Fsource_citation.c;fp=gom%2Fsource_citation.c;h=406972a7b57a5df92eceee4765bb2e44fe8b2f7f;hb=866835ac8928d7e40919c2ca59799cb37023856f;hp=45dc8428a28ecfeeea8255fafe31de26247d06ff;hpb=381d8830b72c656367e4acea20f0a53fb61735d5;p=gedcom-parse.git diff --git a/gom/source_citation.c b/gom/source_citation.c index 45dc842..406972a 100644 --- a/gom/source_citation.c +++ b/gom/source_citation.c @@ -49,10 +49,11 @@ Gedcom_ctxt sub_citation_start(_ELT_PARAMS_) else { struct source_citation *cit = SUB_MAKEFUNC(source_citation)(); if (cit) { + int type = ctxt_type(ctxt); if (GEDCOM_IS_XREF_PTR(parsed_value)) cit->reference = GEDCOM_XREF_PTR(parsed_value); - switch (ctxt->ctxt_type) { + switch (type) { case ELT_SUB_PLAC: ADDFUNC2(place,source_citation)(ctxt, cit); break; case ELT_SUB_FAM_EVT: @@ -81,7 +82,7 @@ Gedcom_ctxt sub_citation_start(_ELT_PARAMS_) case REC_NOTE: ADDFUNC2(note,source_citation)(ctxt, cit); break; default: - UNEXPECTED_CONTEXT(ctxt->ctxt_type); + UNEXPECTED_CONTEXT(type); } result = MAKE_GOM_CTXT(elt, source_citation, cit); }