From e505743a25a165eb6f72077c42bbcce4468c5968 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 8 Oct 2009 11:30:18 -0600 Subject: [PATCH] Fix crash when reading cover from EPUB files --- src/calibre/ebooks/__init__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/calibre/ebooks/__init__.py b/src/calibre/ebooks/__init__.py index 4034a8810b..15f172815c 100644 --- a/src/calibre/ebooks/__init__.py +++ b/src/calibre/ebooks/__init__.py @@ -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