From 418be1ec67c79185046addbe80bca89c7ca8d5d7 Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Thu, 25 Aug 2022 16:28:04 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E4=B8=A4=E5=A4=84?= =?UTF-8?q?=E5=BF=AB=E9=80=9F=E5=88=87=E6=8D=A2=E5=9C=A8=E7=BA=BF=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E5=AF=BC=E8=87=B4=E7=9A=84=E7=A9=BA=E6=8C=87=E9=92=88?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/yunbao/live/dialog/LiveUserMoreDialogFragment.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveUserMoreDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LiveUserMoreDialogFragment.java index a565bc090..70a5a88c0 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveUserMoreDialogFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveUserMoreDialogFragment.java @@ -272,6 +272,9 @@ public class LiveUserMoreDialogFragment extends AbsDialogFragment implements Vie } private List processUserData(JSONObject json){ List data = JSON.parseArray(json.getString("userlist"), LiveUserGiftBean.class); + if(data==null){ + return new ArrayList<>(); + } Log.i("tag222", "ssss"); if (data.size() > 0 && pg == 1) { nums = 0; @@ -297,6 +300,9 @@ public class LiveUserMoreDialogFragment extends AbsDialogFragment implements Vie /** * 由于在线观众和粉丝列表实体结构与榜单结构不一致,做个兼容操作 */ + if(rank==null){ + return data; + } for (Object o : rank) { JSONObject item= (JSONObject) o; LiveUserRankBean bean=JSON.parseObject(item.getString("userinfo"),LiveUserRankBean.class);