mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-04-28 23:04:34 +08:00
Add defense for when active printer is None
This commit is contained in:
parent
f1df7b93c4
commit
99e2939801
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user