From 9ab7b6cfc14626c6117fe90b3474bbbc98d9d97f Mon Sep 17 00:00:00 2001 From: SNoiraud Date: Tue, 3 May 2016 13:25:23 +0200 Subject: [PATCH] 5449: Pedigree view crashes if you happen to choose a child as ancestor --- gramps/plugins/view/pedigreeview.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gramps/plugins/view/pedigreeview.py b/gramps/plugins/view/pedigreeview.py index 5a8b769e3..7df11f1fa 100644 --- a/gramps/plugins/view/pedigreeview.py +++ b/gramps/plugins/view/pedigreeview.py @@ -1665,7 +1665,9 @@ class PedigreeView(NavigationView): sp_id = family.get_mother_handle() else: sp_id = family.get_father_handle() - spouse = self.dbstate.db.get_person_from_handle(sp_id) + spouse = None + if sp_id: + spouse = self.dbstate.db.get_person_from_handle(sp_id) if not spouse: continue @@ -1780,7 +1782,9 @@ class PedigreeView(NavigationView): no_parents = 1 par_list = find_parents(self.dbstate.db, person) for par_id in par_list: - par = self.dbstate.db.get_person_from_handle(par_id) + par = None + if par_id: + par = self.dbstate.db.get_person_from_handle(par_id) if not par: continue