Only try to delete address if present.
authorPeter Verthez <Peter.Verthez@advalvas.be>
Sun, 26 Jan 2003 18:37:24 +0000 (18:37 +0000)
committerPeter Verthez <Peter.Verthez@advalvas.be>
Sun, 26 Jan 2003 18:37:24 +0000 (18:37 +0000)
bin/gedcom-sanitize.c

index 64394495285d488deb8026c83fccc18f5e3bbae4..2698d41d4e7b9c0b353982c98ba9532c2d115555 100644 (file)
@@ -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]) {