Ver código fonte

修复数据不存在导致空指针

wangming 10 meses atrás
pai
commit
f15b6675f9

+ 5 - 0
luckysheet/src/main/java/com/xc/luckysheet/db/server/JfGridUpdateService.java

@@ -2131,6 +2131,11 @@ public class JfGridUpdateService {
                                 int _total = _celldata.size();
                                 for (int y = 0; y < _total; y++) {
                                     JSONObject _b =  _celldata.getJSONObject(y);
+
+                                    if(_b.get("r") == null || _b.get("c") == null) {
+                                        continue;
+                                    }
+
                                     if (_b.get("r").toString().equals(r + "") && _b.get("c").toString().equals(cl + "")) {
                                         _position = y;
                                         break;