Correct sub_note_end callback: parsed value can be NULL.
[gedcom-parse.git] / gom / association.c
index 2d9cc2d56fafd2faf3f2b9e7caf2244d765bb6f1..9398bbc49182929cb32efc2d7fe1cf536a825736 100644 (file)
@@ -97,6 +97,19 @@ void association_subscribe()
                              def_elt_end);
 }
 
+void UNREFALLFUNC(association)(struct association *obj)
+{
+  if (obj) {
+    struct association* runner;
+    for (runner = obj; runner; runner = runner->next) {
+      unref_xref_value(runner->to);
+      UNREFALLFUNC(source_citation)(runner->citation);
+      UNREFALLFUNC(note_sub)(runner->note);
+      UNREFALLFUNC(user_data)(runner->extra);
+    }
+  }
+}
+
 void CLEANFUNC(association)(struct association* assoc)
 {
   if (assoc) {