From dc3fb33c1e7638b0203947ccd100dc3091a31ab2 Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Wed, 20 Apr 2005 16:45:00 +0000 Subject: [PATCH] * src/DisplayModels.py: fix bad index into list * src/Relationship.py: handle race condition where the screen wants to update with a stale family handle after the database has been closed and the internal data has not be rebuilt. * src/GenericFilter.py: Don't crash on corrupt database svn: r4384 --- gramps2/ChangeLog | 8 +++++++- gramps2/src/DisplayModels.py | 2 +- gramps2/src/Relationship.py | 4 ++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 3b77bc716..a296a6ece 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,5 +1,11 @@ +2005-04-20 Don Allingham + * src/DisplayModels.py: fix bad index into list + * src/Relationship.py: handle race condition where the screen + wants to update with a stale family handle after the database + has been closed and the internal data has not be rebuilt. + 2005-04-19 Martin Hawlisch - * GenericFilter.py: Don't crash on corrupt database + * src/GenericFilter.py: Don't crash on corrupt database 2005-04-19 Eero Tamminen * src/GenericFilter.py: Fix typo diff --git a/gramps2/src/DisplayModels.py b/gramps2/src/DisplayModels.py index aa82cbed4..1fdc5adf8 100644 --- a/gramps2/src/DisplayModels.py +++ b/gramps2/src/DisplayModels.py @@ -111,7 +111,7 @@ class BaseModel(gtk.GenericTreeModel): def on_get_path(self, node): '''returns the tree path (a tuple of indices at the various levels) for a particular node.''' - return self.indexlist[node[0]] + return self.indexlist[node] def on_get_column_type(self,index): return gobject.TYPE_STRING diff --git a/gramps2/src/Relationship.py b/gramps2/src/Relationship.py index 0428cb3d2..6386d0f12 100644 --- a/gramps2/src/Relationship.py +++ b/gramps2/src/Relationship.py @@ -170,8 +170,8 @@ class RelationshipCalculator: pmap[person.get_handle()] = rel_str family_handle = person.get_main_parents_family_handle() - if family_handle != None: - family = self.db.get_family_from_handle(family_handle) + family = self.db.get_family_from_handle(family_handle) + if family_handle != None and family: father = self.db.get_person_from_handle(family.get_father_handle()) mother = self.db.get_person_from_handle(family.get_mother_handle()) self.apply_filter(father,rel_str+'f',plist,pmap)