diff --git a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java index 71db9cb55..5b36482e2 100644 --- a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java +++ b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java @@ -697,7 +697,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe if (mLivePlayViewHolder != null && data.getEnterRoomInfo().getIsconnection() != null && data.getEnterRoomInfo().getIsconnection().equals("1")) { JSONArray array = pkInfo.getJSONArray("userlist"); //判断是否是多人连麦 - if (array.size() > 0) {//多人連麥 + if (array!=null&& !array.isEmpty()) {//多人連麥 if (mLivePlayViewHolder != null) { List drPkbeans = new ArrayList<>(); for (int j = 0; j < array.size(); j++) { @@ -783,6 +783,9 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe } if (mLivePlayViewHolder != null) { JSONArray array = pkInfo.getJSONArray("userlist"); + if(array==null){ + array=new JSONArray(); + } List drPkbeans = new ArrayList<>(); for (int j = 0; j < array.size(); j++) { UserBean userBean = new UserBean(); @@ -2379,7 +2382,10 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe * @param time */ public void upDataPkScore(JSONArray pkScores, int time) { - L.eSw("upDataPkScore" + time); + L.eSw("upDataPkScore" + time+"|"+pkScores); + if(pkScores==null){ + return; + } this.pkScores = pkScores; if (mLiveRoomViewHolder != null) { String liveId = mLiveBean.getUid();