소스 검색

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

wangming 10 달 전
부모
커밋
05e2ef13d2
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      luckysheet/src/main/java/com/xc/luckysheet/db/server/JfGridUpdateService.java

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

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