mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix crash when reading cover from EPUB files
This commit is contained in:
parent
26d992843d
commit
e505743a25
@ -103,8 +103,12 @@ def render_html(path_to_html, width=590, height=750):
|
||||
loop = QEventLoop()
|
||||
renderer = HTMLRenderer(page, loop)
|
||||
|
||||
page.connect(page, SIGNAL('loadFinished(bool)'), renderer)
|
||||
page.connect(page, SIGNAL('loadFinished(bool)'), renderer,
|
||||
Qt.QueuedConnection)
|
||||
page.mainFrame().load(QUrl.fromLocalFile(path_to_html))
|
||||
loop.exec_()
|
||||
renderer.loop = renderer.page = None
|
||||
del page
|
||||
del loop
|
||||
return renderer
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user