mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-19 01:25:55 +08: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
@ -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:
|
||||||
self._image_reply.abort()
|
try:
|
||||||
self._image_reply.downloadProgress.disconnect(self._onStreamDownloadProgress)
|
self._image_reply.downloadProgress.disconnect(self._onStreamDownloadProgress)
|
||||||
|
except TypeError:
|
||||||
|
pass #The signal was never connected.
|
||||||
|
self._image_reply.abort()
|
||||||
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…
x
Reference in New Issue
Block a user