Fix #2934 (Crash when aborting cover download)

This commit is contained in:
Kovid Goyal 2009-07-26 10:55:14 -06:00
parent 6cf006db05
commit 8a4754f1d0

View File

@ -526,3 +526,11 @@ class MetadataSingleDialog(ResizableDialog, Ui_MetadataSingleDialog):
QDialog.accept(self)
if callable(self.accepted_callback):
self.accepted_callback(self.id)
def reject(self, *args):
cf = getattr(self, 'cover_fetcher', None)
if cf is not None and hasattr(cf, 'terminate'):
cf.terminate()
cf.wait()
QDialog.reject(self, *args)