From 9dd410ed70fddda4d2871217ec3dfc681703feee Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 3 Oct 2013 10:28:06 +0530 Subject: [PATCH] DOCX Input: Handle numbering without character styles DOCX Input: Fix erorr when converting docx files that have numbering defined with no associated character style. Fixes #1232100 [Private bug](https://bugs.launchpad.net/calibre/+bug/1232100) --- src/calibre/ebooks/docx/numbering.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/ebooks/docx/numbering.py b/src/calibre/ebooks/docx/numbering.py index 602689a8cd..740674d0dd 100644 --- a/src/calibre/ebooks/docx/numbering.py +++ b/src/calibre/ebooks/docx/numbering.py @@ -90,7 +90,7 @@ class Level(object): self.is_numbered = False cs = self.character_style if lt in {'\uf0a7', 'o'} or ( - cs.font_family is not inherit and cs.font_family.lower() in {'wingdings', 'symbol'}): + cs is not None and cs.font_family is not inherit and cs.font_family.lower() in {'wingdings', 'symbol'}): self.fmt = {'\uf0a7':'square', 'o':'circle'}.get(lt, 'disc') else: self.bullet_template = lt