Quellcode durchsuchen

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

wangming vor 10 Monaten
Ursprung
Commit
05e2ef13d2

+ 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;