5290: Unhandled exception when merging people

svn: r18654
This commit is contained in:
Michiel Nauta 2011-12-25 09:28:45 +00:00
parent c4c1b737bb
commit 2c2a76b5a2

View File

@ -495,6 +495,11 @@ class DisplayState(gen.utils.Callback):
return self.disprel_old return self.disprel_old
active = dbstate.db.get_person_from_handle(active_handle) active = dbstate.db.get_person_from_handle(active_handle)
if active is None:
# During merger this method can be called at a time when treemodel
# and database are not in sync, resulting in active_handle != None,
# but active == None; see bug 5290 for the details.
return u''
name = self.relationship.get_one_relationship( name = self.relationship.get_one_relationship(
dbstate.db, default_person, active) dbstate.db, default_person, active)
#store present call data #store present call data