Browse Source

Fix base.selectedPrinter is undefined problem

Lipu Fei 7 years ago
parent
commit
920c90010f
1 changed files with 4 additions and 0 deletions
  1. 4 0
      plugins/UM3NetworkPrinting/DiscoverUM3Action.qml

+ 4 - 0
plugins/UM3NetworkPrinting/DiscoverUM3Action.qml

@@ -278,6 +278,10 @@ Cura.MachineAction
                     width: parent.width
                     wrapMode: Text.WordWrap
                     text:{
+                        if (base.selectedPrinter == undefined)
+                        {
+                            return "";
+                        }
                         // The property cluster size does not exist for older UM3 devices.
                         if(base.selectedPrinter != undefined && base.selectedPrinter.clusterSize == null || base.selectedPrinter.clusterSize == 1)
                         {