Unlink xrefs properly when struct is deleted.
[gedcom-parse.git] / gom / source_description.c
index 87f34abad7390f04267f583dde6e78b0534b8fc3..71bd9e816db3a73c3357748ce8eb520f3345d2ca 100644 (file)
@@ -75,6 +75,16 @@ void source_description_subscribe()
                              sub_sour_caln_medi_start, def_elt_end);
 }
 
+void UNREFALLFUNC(source_description)(struct source_description* obj)
+{
+  if (obj) {
+    struct source_description* runner;
+    for (runner = obj; runner; runner = runner->next) {
+      UNREFALLFUNC(user_data)(runner->extra);
+    }
+  }
+}
+
 void CLEANFUNC(source_description)(struct source_description* desc)
 {
   if (desc) {