From: Peter Verthez Date: Sun, 26 Jan 2003 18:37:24 +0000 (+0000) Subject: Only try to delete address if present. X-Git-Url: https://git.dlugolecki.net.pl/?a=commitdiff_plain;h=f8f253aa29e3c2561d325cb47cc17a727f76266e;p=gedcom-parse.git Only try to delete address if present. --- diff --git a/bin/gedcom-sanitize.c b/bin/gedcom-sanitize.c index 6439449..2698d41 100644 --- a/bin/gedcom-sanitize.c +++ b/bin/gedcom-sanitize.c @@ -90,9 +90,11 @@ int update_header() if (value != NULL) return 1; - result = gom_delete_address(&head->source.corporation.address); - if (result != 0) - return 1; + if (head->source.corporation.address) { + result = gom_delete_address(&head->source.corporation.address); + if (result != 0) + return 1; + } for (i=0; i<3; i++) { if (head->source.corporation.phone[i]) {