mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #1290097 ["epub" without toc crashes](https://bugs.launchpad.net/calibre/+bug/1290097)
This commit is contained in:
parent
1ee24745ee
commit
4836d17783
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user