Просмотр исходного кода

Fix crash on no output devices in list.

Remco Burema 6 лет назад
Родитель
Сommit
c50fcf42c5
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      cura/Settings/MachineManager.py

+ 2 - 2
cura/Settings/MachineManager.py

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