diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 5a581ff7d..623ddebab 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,6 +1,7 @@ 2005-04-21 Martin Hawlisch * src/ReadGedcom.py (parse_family_object): Set MediaRef properly; - (parse_individual): Set Adoption event properly + (parse_individual): Set Adoption event properly; + (importData): Dont crash because of a short line; * src/Marriage.py (__init__): Properly get place title 2005-04-20 Don Allingham diff --git a/gramps2/src/ReadGedcom.py b/gramps2/src/ReadGedcom.py index 7cae98af7..29dcf7f42 100644 --- a/gramps2/src/ReadGedcom.py +++ b/gramps2/src/ReadGedcom.py @@ -142,9 +142,9 @@ def importData(database, filename, cb=None, use_trans=True): line = f.readline().split() if len(line) == 0: break - if line[1] == 'CHAR' and line[2] == "ANSEL": + if len(line) > 2 and line[1] == 'CHAR' and line[2] == "ANSEL": ansel = True - if line[1] == 'SOUR' and line[2] == "GRAMPS": + if len(line) > 2 and line[1] == 'SOUR' and line[2] == "GRAMPS": gramps = True f.close()