X-Git-Url: https://git.dlugolecki.net.pl/?a=blobdiff_plain;f=gom%2Fassociation.c;h=dc45c06324fa32a810c80a542d8270155e3dac56;hb=473f146038f88434e3edd070dfa42390bd0df60f;hp=9e392099c5fe73daed06146a375ed7e339952c11;hpb=bb2090762d3ae9355a04286c33b78d24736b783c;p=gedcom-parse.git diff --git a/gom/association.c b/gom/association.c index 9e39209..dc45c06 100644 --- a/gom/association.c +++ b/gom/association.c @@ -42,13 +42,14 @@ Gedcom_ctxt sub_assoc_start(_ELT_PARAMS_) else { struct association *assoc = SUB_MAKEFUNC(association)(); if (assoc) { + int type = ctxt_type(ctxt); assoc->to = GEDCOM_XREF_PTR(parsed_value); - - switch (ctxt->ctxt_type) { + + switch (type) { case REC_INDI: ADDFUNC2(individual,association)(ctxt, assoc); default: - UNEXPECTED_CONTEXT(ctxt->ctxt_type); + UNEXPECTED_CONTEXT(type); } result = MAKE_GOM_CTXT(elt, association, assoc); }