Unlink xrefs properly when struct is deleted.
[gedcom-parse.git] / gom / address.c
index fa8a3ee0a98eba2d3ae0aed727177984f8902186..b0d49a06f42cc556ae4326c92098c7c4fc37db56 100644 (file)
@@ -147,6 +147,13 @@ void address_subscribe()
   gedcom_subscribe_to_element(ELT_SUB_PHON, sub_phon_start, def_elt_end);
 }
 
+void UNREFALLFUNC(address)(struct address *address)
+{
+  if (address) {
+    UNREFALLFUNC(user_data)(address->extra);
+  }
+}
+
 void CLEANFUNC(address)(struct address *address)
 {
   if (address) {