From 4ff2cf30e2b6d40e6ef2b4c2fd8c91bc39112ece Mon Sep 17 00:00:00 2001 From: Tom Samstag Date: Fri, 1 Jan 2016 09:46:20 -0800 Subject: [PATCH] fix handling of a None handle --- gramps/plugins/lib/libsubstkeyword.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gramps/plugins/lib/libsubstkeyword.py b/gramps/plugins/lib/libsubstkeyword.py index 3850c195b..bc8eeecf5 100644 --- a/gramps/plugins/lib/libsubstkeyword.py +++ b/gramps/plugins/lib/libsubstkeyword.py @@ -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