Report plugin krasch

Load data.gramps, start with the default person (I0037,
Edwin Michael Smith), run Family Descendant Tree, choose
"Start with the parent(s) of the selected first", hit OK:

.../descendtree.py", line 881, in start
    family2 = self.database.get_family_from_handle(family2_h)
...

Or start with I0057 (Anna Louise Smith), run Family Descendant
Tree, choose "Start with the parent(s) ...", hit OK:

.../descendtree.py", line 773, in start
    family2 = self.database.get_family_from_handle(family2_h)
...

Fixes #10811
This commit is contained in:
Paul Franklin 2018-09-26 17:11:42 -07:00
parent cc7e4fda85
commit e667431dd5

View File

@ -770,15 +770,18 @@ class MakeFamilyTree(RecurseDown):
father1 = self.database.get_person_from_handle(father1_h) father1 = self.database.get_person_from_handle(father1_h)
if self.do_parents: #b3 - remove grandparents? if self.do_parents: #b3 - remove grandparents?
family2_h = father1.get_main_parents_family_handle() family2_h = father1.get_main_parents_family_handle()
if family2_h:
family2 = self.database.get_family_from_handle(family2_h) family2 = self.database.get_family_from_handle(family2_h)
if mother1_h: if mother1_h:
mother1 = self.database.get_person_from_handle(mother1_h) mother1 = self.database.get_person_from_handle(mother1_h)
mother2_h = father2_h = None mother2_h = father2_h = father2 = mother2 = None
if family2: #family2 = fathers parents if family2: #family2 = fathers parents
mother2_h = family2.get_mother_handle() mother2_h = family2.get_mother_handle()
if mother2_h:
mother2 = self.database.get_person_from_handle(mother2_h) mother2 = self.database.get_person_from_handle(mother2_h)
father2_h = family2.get_father_handle() father2_h = family2.get_father_handle()
if father2_h:
father2 = self.database.get_person_from_handle(father2_h) father2 = self.database.get_person_from_handle(father2_h)
#Helper variables. Assigned in one section, used in another. #Helper variables. Assigned in one section, used in another.
@ -878,13 +881,16 @@ class MakeFamilyTree(RecurseDown):
mother1 = self.database.get_person_from_handle(mother1_h) mother1 = self.database.get_person_from_handle(mother1_h)
if self.do_parents: #b3 - remove grandparents? if self.do_parents: #b3 - remove grandparents?
family2_h = mother1.get_main_parents_family_handle() family2_h = mother1.get_main_parents_family_handle()
if family2_h:
family2 = self.database.get_family_from_handle(family2_h) family2 = self.database.get_family_from_handle(family2_h)
mother2_h = father2_h = None mother2_h = father2_h = mother2 = father2 = None
if family2: if family2:
mother2_h = family2.get_mother_handle() mother2_h = family2.get_mother_handle()
if mother2_h:
mother2 = self.database.get_person_from_handle(mother2_h) mother2 = self.database.get_person_from_handle(mother2_h)
father2_h = family2.get_father_handle() father2_h = family2.get_father_handle()
if father2_h:
father2 = self.database.get_person_from_handle(father2_h) father2 = self.database.get_person_from_handle(father2_h)
####################### #######################