fix handling of a None handle

This commit is contained in:
Tom Samstag 2016-01-01 09:46:20 -08:00 committed by Paul Franklin
parent 307f236771
commit 4ff2cf30e2

View File

@ -1076,13 +1076,15 @@ class SubstKeywords(object):
"""get the person and find the family/spouse to use for this display"""
self.database = database
self.person = database.get_person_from_handle(person_handle)
self.family = None
self.spouse = None
self.line = None # Consumable_string - set below
self._locale = locale
self._nd = name_displayer
self.person = None
if person_handle is not None:
self.person = database.get_person_from_handle(person_handle)
if self.person is None:
return