geofamily crashes if a family has no father (#1188)

This commit is contained in:
Serge Noiraud 2021-05-06 17:14:49 +02:00 committed by GitHub
parent 1d72f4b23d
commit eb4ce9ff79
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -370,8 +370,9 @@ class GeoFamily(GeoGraphyView):
_("Family places for %s") % self.family_label(family))
person = None
if family:
person = dbstate.db.get_person_from_handle(
family.get_father_handle())
handle = family.get_father_handle()
if handle:
person = dbstate.db.get_person_from_handle(handle)
else:
return
family_id = family.gramps_id