From bbab6e160d5789b0c6d212300d8349f50b39d9b0 Mon Sep 17 00:00:00 2001 From: "Craig J. Anderson" Date: Wed, 1 Aug 2012 18:46:40 +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 errors when a person is unknown in the database. svn: r20170 --- 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 9142eaa37..eef92be74 100644 --- a/src/plugins/lib/libsubstkeyword.py +++ b/src/plugins/lib/libsubstkeyword.py @@ -856,6 +856,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