mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 15:07:28 -06:00
Prevent crash if disconnect already happend
CL-541
This commit is contained in:
parent
9754aa5397
commit
b1e9e3b8fa
1 changed files with 5 additions and 1 deletions
|
@ -227,7 +227,11 @@ class UM3OutputDevicePlugin(OutputDevicePlugin):
|
||||||
if device:
|
if device:
|
||||||
if device.isConnected():
|
if device.isConnected():
|
||||||
device.disconnect()
|
device.disconnect()
|
||||||
device.connectionStateChanged.disconnect(self._onDeviceConnectionStateChanged)
|
try:
|
||||||
|
device.connectionStateChanged.disconnect(self._onDeviceConnectionStateChanged)
|
||||||
|
except TypeError:
|
||||||
|
# Disconnect already happened.
|
||||||
|
pass
|
||||||
|
|
||||||
self.discoveredDevicesChanged.emit()
|
self.discoveredDevicesChanged.emit()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue