diff --git a/live/src/main/java/com/yunbao/live/socket/SocketRyClient.java b/live/src/main/java/com/yunbao/live/socket/SocketRyClient.java index 994c4d589..05a061da8 100644 --- a/live/src/main/java/com/yunbao/live/socket/SocketRyClient.java +++ b/live/src/main/java/com/yunbao/live/socket/SocketRyClient.java @@ -825,7 +825,7 @@ public class SocketRyClient { chatBean.setContentColor(map.getString("contentColor"));//文字内容颜色 chatBean.setAtUserName(map.getString("atUserName"));//@名字 chatBean.setAtUserID(map.getString("atUserID"));//@ID - if (!map.getString("guard_type").equals("undefined")) { + if (map.containsKey("guard_type")&&!map.getString("guard_type").equals("undefined")) { chatBean.setGuardType(map.getIntValue("guard_type")); } try {