Ver Fonte

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

wangming há 10 meses atrás
pai
commit
0bb5478bb3

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

@@ -2101,6 +2101,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 + "")) {
                                         _b.put("v", v);
                                         _position = y;