mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-21 13:47:51 -06:00
Don't try to disconnect after aborting
Because if the signal is not connected then we'd get a segfault in this case. Contributes to issue CURA-4376.
This commit is contained in:
parent
1aa6d2876c
commit
6fc62fd2b3
1 changed files with 4 additions and 3 deletions
|
@ -331,13 +331,14 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice):
|
||||||
|
|
||||||
if self._camera_timer.isActive():
|
if self._camera_timer.isActive():
|
||||||
self._camera_timer.stop()
|
self._camera_timer.stop()
|
||||||
else: #Camera wasn't even running. Don't try to stop it or you'll get a segfault.
|
|
||||||
return
|
|
||||||
|
|
||||||
if self._image_reply:
|
if self._image_reply:
|
||||||
try:
|
try:
|
||||||
|
try:
|
||||||
|
self._image_reply.downloadProgress.disconnect(self._onStreamDownloadProgress)
|
||||||
|
except TypeError:
|
||||||
|
pass #The signal was never connected.
|
||||||
self._image_reply.abort()
|
self._image_reply.abort()
|
||||||
self._image_reply.downloadProgress.disconnect(self._onStreamDownloadProgress)
|
|
||||||
except RuntimeError:
|
except 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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue