xrefs = hash_create(HASHCOUNT_T_MAX, NULL, NULL);
hash_set_allocator(xrefs, xref_alloc, xref_free, NULL);
}
xrefs = hash_create(HASHCOUNT_T_MAX, NULL, NULL);
hash_set_allocator(xrefs, xref_alloc, xref_free, NULL);
}
xr->xref.string = strdup(raw_value);
hash_alloc_insert(xrefs, key, xr);
}
xr->xref.string = strdup(raw_value);
hash_alloc_insert(xrefs, key, xr);
}
- return NULL;
- }
-
- if ((ctxt == XREF_USED && xr->used_type != xref_type)
- || (ctxt == XREF_DEFINED &&
- (xr->used_type != XREF_NONE && xr->used_type != xref_type))) {
+ clear_xref_node(xr);
+ }
+ else if ((ctxt == XREF_USED && xr->used_type != xref_type)
+ || (ctxt == XREF_DEFINED &&
+ (xr->used_type != XREF_NONE && xr->used_type != xref_type))) {
gedcom_error(_("Cross-reference %s previously used as pointer to %s, "
"on line %d"),
xr->xref.string, xref_type_str[xr->used_type], xr->used_line);
gedcom_error(_("Cross-reference %s previously used as pointer to %s, "
"on line %d"),
xr->xref.string, xref_type_str[xr->used_type], xr->used_line);