修复登录时getRandJoinAnchor接口返回info为空导致的空指针闪退问题

This commit is contained in:
zlzw 2022-12-20 10:06:48 +08:00
parent 2d2cc21e15
commit 3af7ca5d94

View File

@ -243,7 +243,7 @@ public class LoginActivity extends AbsActivity {
new LiveRoomCheckLivePresenter(mContext, liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() { new LiveRoomCheckLivePresenter(mContext, liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() {
@Override @Override
public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk) { public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk) {
RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveSdk), Integer.parseInt(liveTypeVal)); RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveSdk), Integer.parseInt(liveTypeVal));
} }
@Override @Override
@ -291,7 +291,7 @@ public class LoginActivity extends AbsActivity {
.execute(new HttpCallback() { .execute(new HttpCallback() {
@Override @Override
public void onSuccess(int code, String msg, String[] info) { public void onSuccess(int code, String msg, String[] info) {
if (info[0] != null && mFirstLogin == true) { if (info != null && info.length > 0 && info[0] != null && mFirstLogin) {
JSONObject obj = JSON.parseObject(info[0]); JSONObject obj = JSON.parseObject(info[0]);
if (obj.containsKey("home_zdy_img_us")) { if (obj.containsKey("home_zdy_img_us")) {
home_zdy_img_us = obj.getString("home_zdy_img_us"); home_zdy_img_us = obj.getString("home_zdy_img_us");