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

Commit

Permalink
修复空指针
Browse files Browse the repository at this point in the history
  • Loading branch information
hellokaton committed Jun 18, 2017
1 parent db7d415 commit fb46a80
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/main/java/io/github/biezhi/wechat/api/WechatApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -510,9 +510,11 @@ public JsonObject wxSync() {
}

JsonObject dic = response.getAsJsonObject();
JsonObject baseResponse = dic.getAsJsonObject("BaseResponse");
if (baseResponse.get("Ret").getAsInt() == 0) {
this.makeSynckey(dic);
if (null != dic) {
JsonObject baseResponse = dic.getAsJsonObject("BaseResponse");
if (null != baseResponse && baseResponse.get("Ret").getAsInt() == 0) {
this.makeSynckey(dic);
}
}
return dic;
}
Expand Down

0 comments on commit fb46a80

Please sign in to comment.