diff options
author | fieldOfView <aldo@fieldofview.com> | 2018-10-04 13:32:42 +0300 |
---|---|---|
committer | fieldOfView <aldo@fieldofview.com> | 2018-10-04 13:43:42 +0300 |
commit | 5b2dc804cac706537f7daf5bd0d6c24bf4e3b5d8 (patch) | |
tree | 3d56fec882b1df560b5c824ba94e85e0789cfb28 /plugins/FirmwareUpdater | |
parent | 28dc32adaba8e9bae6361ba06fb0872b4a275530 (diff) |
Fix a crash when adding a printer part of a cluster
Diffstat (limited to 'plugins/FirmwareUpdater')
-rw-r--r-- | plugins/FirmwareUpdater/FirmwareUpdaterMachineAction.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/FirmwareUpdater/FirmwareUpdaterMachineAction.py b/plugins/FirmwareUpdater/FirmwareUpdaterMachineAction.py index 4faa3abc64..4a172b6557 100644 --- a/plugins/FirmwareUpdater/FirmwareUpdaterMachineAction.py +++ b/plugins/FirmwareUpdater/FirmwareUpdaterMachineAction.py @@ -39,13 +39,13 @@ class FirmwareUpdaterMachineAction(MachineAction): CuraApplication.getInstance().getMachineActionManager().addSupportedAction(container.getId(), self.getKey()) def _onOutputDevicesChanged(self) -> None: - if self._active_output_device: + if self._active_output_device and self._active_output_device.activePrinter: self._active_output_device.activePrinter.getController().canUpdateFirmwareChanged.disconnect(self._onControllerCanUpdateFirmwareChanged) output_devices = CuraApplication.getInstance().getMachineManager().printerOutputDevices self._active_output_device = output_devices[0] if output_devices else None - if self._active_output_device: + if self._active_output_device and self._active_output_device.activePrinter: self._active_output_device.activePrinter.getController().canUpdateFirmwareChanged.connect(self._onControllerCanUpdateFirmwareChanged) self.outputDeviceCanUpdateFirmwareChanged.emit() |