From 740da0aedcda51fb0ffca70a248832c05e0819dd Mon Sep 17 00:00:00 2001 From: "Craig J. Anderson" Date: Wed, 1 Aug 2012 18:58:53 +0000 Subject: [PATCH] fix for: http://www.gramps-project.org/bugs/view.php?id=5960 http://www.gramps-project.org/bugs/view.php?id=5958 an event crashed when the person was not known. svn: r20171 --- src/plugins/lib/libsubstkeyword.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plugins/lib/libsubstkeyword.py b/src/plugins/lib/libsubstkeyword.py index 42f6a5032..1217fe2f9 100644 --- a/src/plugins/lib/libsubstkeyword.py +++ b/src/plugins/lib/libsubstkeyword.py @@ -732,6 +732,8 @@ class VariableParse(object): def get_event_by_name(self, person, event_name): """ get an event from a name. """ + if not person: + return None for e_ref in person.get_event_ref_list(): if not e_ref: continue