Two more fixes for protecting None.property when using Do Not Include Unlinked records

svn: r15929
This commit is contained in:
Doug Blank 2010-09-25 11:00:25 +00:00
parent ae8ba555eb
commit 3fb1e0fd4a

View File

@ -609,6 +609,8 @@ class GedcomWriter(UpdateCallback):
"""
for event_ref in person.get_event_ref_list():
event = self.dbase.get_event_from_handle(event_ref.ref)
if event is None:
continue
etype = int(event.get_type())
# if the event is a birth or death, skip it.
@ -1106,6 +1108,7 @@ class GedcomWriter(UpdateCallback):
"""
if event_ref:
event = self.dbase.get_event_from_handle(event_ref.ref)
if event:
if event_has_subordinate_data(event, event_ref):
self.__writeln(1, key)
else: