Bläddra i källkod

添加容错判断

jsonwang 3 år sedan
förälder
incheckning
4c3f914d9d
1 ändrade filer med 4 tillägg och 0 borttagningar
  1. 4 0
      BFFramework/Classes/Stuckpoint/View/PQSpeedSettingView.swift

+ 4 - 0
BFFramework/Classes/Stuckpoint/View/PQSpeedSettingView.swift

@@ -115,6 +115,10 @@ class PQSpeedSettingView: UIView {
     ///   - setEnable: 设置不可用状态
     func setSelectItem(index:Int,isSettingPlayer:Bool = true,setDisable:Bool = false,isCancle:Bool = false) {
        BFLog(message: "setSelectItem is \(index)")
+        if(index < 0){
+            BFLog(message: "选择位置数据出错\(index)")
+            return
+        }
         //设置不可用状态
         if(setDisable){
             for (i,model) in datas.enumerated() {