5449: Pedigree view crashes if you happen to choose a child as ancestor
This commit is contained in:
parent
099e88eef3
commit
9ab7b6cfc1
@ -1665,6 +1665,8 @@ class PedigreeView(NavigationView):
|
|||||||
sp_id = family.get_mother_handle()
|
sp_id = family.get_mother_handle()
|
||||||
else:
|
else:
|
||||||
sp_id = family.get_father_handle()
|
sp_id = family.get_father_handle()
|
||||||
|
spouse = None
|
||||||
|
if sp_id:
|
||||||
spouse = self.dbstate.db.get_person_from_handle(sp_id)
|
spouse = self.dbstate.db.get_person_from_handle(sp_id)
|
||||||
if not spouse:
|
if not spouse:
|
||||||
continue
|
continue
|
||||||
@ -1780,6 +1782,8 @@ class PedigreeView(NavigationView):
|
|||||||
no_parents = 1
|
no_parents = 1
|
||||||
par_list = find_parents(self.dbstate.db, person)
|
par_list = find_parents(self.dbstate.db, person)
|
||||||
for par_id in par_list:
|
for par_id in par_list:
|
||||||
|
par = None
|
||||||
|
if par_id:
|
||||||
par = self.dbstate.db.get_person_from_handle(par_id)
|
par = self.dbstate.db.get_person_from_handle(par_id)
|
||||||
if not par:
|
if not par:
|
||||||
continue
|
continue
|
||||||
|
Loading…
Reference in New Issue
Block a user