From 99e2939801d5a163e16b8c6fe7504bb4ed14e858 Mon Sep 17 00:00:00 2001 From: ChrisTerBeke Date: Wed, 10 Jul 2019 12:55:12 +0200 Subject: [PATCH] Add defense for when active printer is None --- plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDevice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDevice.py b/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDevice.py index 40d4d9f338..8d872d33f5 100644 --- a/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDevice.py +++ b/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDevice.py @@ -256,7 +256,7 @@ class CloudOutputDevice(NetworkedPrinterOutputDevice): remote_printers_keys = [printer_data.uuid for printer_data in remote_printers] removed_printers = [printer for printer in self._printers if printer.key not in remote_printers_keys] for removed_printer in removed_printers: - if self._active_printer.key == removed_printer.key: + if self._active_printer and self._active_printer.key == removed_printer.key: self.setActivePrinter(None) self._printers = new_printers