Maybe fix segfault on download errors.
This commit is contained in:
parent
7cf9989bff
commit
53b617590f
@ -137,6 +137,12 @@ class DownloadItem(QObject):
|
||||
|
||||
def _die(self, msg):
|
||||
"""Abort the download and emit an error."""
|
||||
self.reply.downloadProgress.disconnect()
|
||||
self.reply.finished.disconnect()
|
||||
self.reply.error.disconnect()
|
||||
self.reply.readyRead.disconnect()
|
||||
self.bytes_done = self.bytes_total
|
||||
self.timer.stop()
|
||||
self.error.emit(msg)
|
||||
self.reply.abort()
|
||||
self.reply.deleteLater()
|
||||
|
Loading…
Reference in New Issue
Block a user