Browse Source

Fix crash on no output devices in list.

Remco Burema 6 years ago
parent
commit
c50fcf42c5
1 changed files with 2 additions and 2 deletions
  1. 2 2
      cura/Settings/MachineManager.py

+ 2 - 2
cura/Settings/MachineManager.py

@@ -519,13 +519,13 @@ class MachineManager(QObject):
 
 
     @pyqtProperty(str, notify = globalContainerChanged)
     @pyqtProperty(str, notify = globalContainerChanged)
     def activeMachineFirmwareVersion(self) -> str:
     def activeMachineFirmwareVersion(self) -> str:
-        if not self._printer_output_devices[0]:
+        if not self._printer_output_devices:
             return ""
             return ""
         return self._printer_output_devices[0].firmwareVersion
         return self._printer_output_devices[0].firmwareVersion
 
 
     @pyqtProperty(str, notify = globalContainerChanged)
     @pyqtProperty(str, notify = globalContainerChanged)
     def activeMachineAddress(self) -> str:
     def activeMachineAddress(self) -> str:
-        if not self._printer_output_devices[0]:
+        if not self._printer_output_devices:
             return ""
             return ""
         return self._printer_output_devices[0].address
         return self._printer_output_devices[0].address