mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-02 20:52:20 -07:00
Merge branch '3.0' into layerview-slider-refactor
This commit is contained in:
commit
284e4d47b8
1 changed files with 8 additions and 4 deletions
|
|
@ -332,13 +332,17 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice):
|
||||||
self._camera_timer.stop()
|
self._camera_timer.stop()
|
||||||
|
|
||||||
if self._image_reply:
|
if self._image_reply:
|
||||||
|
skip_abort = False
|
||||||
try:
|
try:
|
||||||
try:
|
try:
|
||||||
self._image_reply.downloadProgress.disconnect(self._onStreamDownloadProgress)
|
self._image_reply.downloadProgress.disconnect(self._onStreamDownloadProgress)
|
||||||
except TypeError:
|
except Exception as e:
|
||||||
pass #The signal was never connected.
|
if type(e) != RuntimeError: # can happen the RuntimeError occurs before calling abort (=see below), then then the application will crash
|
||||||
self._image_reply.abort()
|
skip_abort = True
|
||||||
except RuntimeError:
|
pass #The signal was never connected.
|
||||||
|
if not skip_abort:
|
||||||
|
self._image_reply.abort()
|
||||||
|
except Exception as e: #RuntimeError
|
||||||
pass # It can happen that the wrapped c++ object is already deleted.
|
pass # It can happen that the wrapped c++ object is already deleted.
|
||||||
self._image_reply = None
|
self._image_reply = None
|
||||||
self._image_request = None
|
self._image_request = None
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue