Catch possible crash in Pedigree View.

svn: r8474
This commit is contained in:
Brian Matherly 2007-05-15 11:38:03 +00:00
parent f6daab7c33
commit 4bf26206ac
2 changed files with 4 additions and 1 deletions

View File

@ -1,3 +1,6 @@
2007-05-15 Brian Matherly <brian@gramps-project.org>
* src/DataViews/_PedigreeView.py: catch possible crash
2007-05-14 Brian Matherly <brian@gramps-project.org> 2007-05-14 Brian Matherly <brian@gramps-project.org>
* src/plugins/NarrativeWeb.py: 0001044: ReportWeb Site, tab Page Generation * src/plugins/NarrativeWeb.py: 0001044: ReportWeb Site, tab Page Generation
- items in dropdown list do not sort correctly - items in dropdown list do not sort correctly

View File

@ -861,7 +861,7 @@ class PedigreeView(PageView.PersonNavView):
obj = self.dbstate.db.get_object_from_handle(object_handle) obj = self.dbstate.db.get_object_from_handle(object_handle)
if obj: if obj:
mtype = obj.get_mime_type() mtype = obj.get_mime_type()
if mtype[0:5] == "image": if mtype and mtype[0:5] == "image":
image = ImgManip.get_thumbnail_path(obj.get_path()) image = ImgManip.get_thumbnail_path(obj.get_path())
if cairo_available: if cairo_available:
pw = PersonBoxWidget_cairo( self.format_helper, lst[i][0], lst[i][3], positions[i][0][3], image); pw = PersonBoxWidget_cairo( self.format_helper, lst[i][0], lst[i][3], positions[i][0][3], image);