修复firebase反馈的空指针问题

This commit is contained in:
zlzw 2022-10-28 13:12:39 +08:00
parent 4be0148324
commit 07ae094bed

View File

@ -1009,7 +1009,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
@Override @Override
public void onHourRank(LiveChatBean bean, JSONObject ranks) { public void onHourRank(LiveChatBean bean, JSONObject ranks) {
if (mLiveRoomViewHolder != null && !TextUtils.isEmpty(liveID)) { if (mLiveRoomViewHolder != null && !TextUtils.isEmpty(liveID) && ranks != null) {
mLiveRoomViewHolder.setHourRankData(ranks.getInteger(liveID)); mLiveRoomViewHolder.setHourRankData(ranks.getInteger(liveID));
} }
} }
@ -1626,8 +1626,8 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
/** /**
* 幸运天使 * 幸运天使
*/ */
public void luckyAngel(MsgModel model){ public void luckyAngel(MsgModel model) {
if(mLiveRoomViewHolder != null){ if (mLiveRoomViewHolder != null) {
mLiveRoomViewHolder.luckyAngel(model); mLiveRoomViewHolder.luckyAngel(model);
} }
} }