fix crash on add person in empty person treeview

svn: r16039
This commit is contained in:
Benny Malengier 2010-10-24 18:48:31 +00:00
parent 5a270125fb
commit 9e592f65dc

View File

@ -159,6 +159,9 @@ class PersonTreeView(BasePersonView):
# attempt to get the current surname
(model, pathlist) = self.selection.get_selected_rows()
name = gen.lib.Name()
#the editor requires a surname
name.add_surname(gen.lib.Surname())
name.set_primary_surname(0)
basepers = None
if len(pathlist) == 1:
path = pathlist[0]