From 46229b2e273d279375978f2e0550fc09c55863c1 Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Sun, 9 Aug 2015 15:16:26 -0400 Subject: [PATCH] gen.db.base: protection from missing parent --- gramps/gen/db/base.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gramps/gen/db/base.py b/gramps/gen/db/base.py index a5102df32..34933b967 100644 --- a/gramps/gen/db/base.py +++ b/gramps/gen/db/base.py @@ -1747,8 +1747,9 @@ class DbWriteBase(DbReadBase): self.find_backlink_handles(family_handle, ['Person'])] for phandle in person_list: person = self.get_person_from_handle(phandle) - person.remove_handle_references('Family', [family_handle]) - self.commit_person(person, trans) + if person: + person.remove_handle_references('Family', [family_handle]) + self.commit_person(person, trans) self.remove_family(family_handle, trans) def remove_parent_from_family(self, person_handle, family_handle,