mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 20:29:05 +08:00
Fix crash for when resetDownload is called after a long wait
CURA-6448
This commit is contained in:
parent
c2b901ae47
commit
9cc4665db8
@ -561,7 +561,13 @@ class Toolbox(QObject, Extension):
|
|||||||
self._download_reply.downloadProgress.disconnect(self._onDownloadProgress)
|
self._download_reply.downloadProgress.disconnect(self._onDownloadProgress)
|
||||||
except (TypeError, RuntimeError): # Raised when the method is not connected to the signal yet.
|
except (TypeError, RuntimeError): # Raised when the method is not connected to the signal yet.
|
||||||
pass # Don't need to disconnect.
|
pass # Don't need to disconnect.
|
||||||
|
try:
|
||||||
self._download_reply.abort()
|
self._download_reply.abort()
|
||||||
|
except RuntimeError:
|
||||||
|
# In some cases the garbage collector is a bit to agressive, which causes the dowload_reply
|
||||||
|
# to be deleted (especially if the machine has been put to sleep). As we don't know what exactly causes
|
||||||
|
# this (The issue probably lives in the bowels of (py)Qt somewhere), we can only catch and ignore it.
|
||||||
|
pass
|
||||||
self._download_reply = None
|
self._download_reply = None
|
||||||
self._download_request = None
|
self._download_request = None
|
||||||
self.setDownloadProgress(0)
|
self.setDownloadProgress(0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user