diff --git a/src/calibre/ebooks/oeb/polish/toc.py b/src/calibre/ebooks/oeb/polish/toc.py index 98d5e534fc..ac87b7ae66 100644 --- a/src/calibre/ebooks/oeb/polish/toc.py +++ b/src/calibre/ebooks/oeb/polish/toc.py @@ -182,7 +182,7 @@ def find_existing_toc(container): def get_toc(container, verify_destinations=True): toc = find_existing_toc(container) - if toc is None: + if toc is None or not container.has_name(toc): ans = TOC() ans.lang = ans.uid = None return ans