From 6eba9558e1788491fb7c484c8efa7c2e458a70e5 Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Tue, 11 Jun 2024 17:03:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Duserlist=E5=8F=AF=E8=83=BD?= =?UTF-8?q?=E4=B8=BA=E7=A9=BA=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/yunbao/live/views/PortraitLiveManager.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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();