Skip to content
This repository was archived by the owner on Jun 5, 2018. It is now read-only.

Commit fb46a80

Browse files
committed
修复空指针
1 parent db7d415 commit fb46a80

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/main/java/io/github/biezhi/wechat/api/WechatApi.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -510,9 +510,11 @@ public JsonObject wxSync() {
510510
}
511511

512512
JsonObject dic = response.getAsJsonObject();
513-
JsonObject baseResponse = dic.getAsJsonObject("BaseResponse");
514-
if (baseResponse.get("Ret").getAsInt() == 0) {
515-
this.makeSynckey(dic);
513+
if (null != dic) {
514+
JsonObject baseResponse = dic.getAsJsonObject("BaseResponse");
515+
if (null != baseResponse && baseResponse.get("Ret").getAsInt() == 0) {
516+
this.makeSynckey(dic);
517+
}
516518
}
517519
return dic;
518520
}

0 commit comments

Comments
 (0)