Only try to delete address if present.
[gedcom-parse.git] / gom / repository.c
index 9d383fa6347f1297592ef48f0ffec6c7dff2c919..57c6f2889dd5fd5cc8dd9c7a072da904ec71e137 100644 (file)
@@ -58,6 +58,17 @@ void repository_subscribe()
   gedcom_subscribe_to_element(ELT_REPO_NAME, repo_name_start, def_elt_end);
 }
 
+void UNREFALLFUNC(repository)(struct repository *obj)
+{
+  if (obj) {
+    UNREFALLFUNC(address)(obj->address);
+    UNREFALLFUNC(note_sub)(obj->note);
+    UNREFALLFUNC(user_ref_number)(obj->ref);
+    UNREFALLFUNC(change_date)(obj->change_date);
+    UNREFALLFUNC(user_data)(obj->extra);
+  }
+}
+
 void CLEANFUNC(repository)(struct repository* repo)
 {
   if (repo) {