diff --git a/android/src/main/java/com/easemob/im_flutter_sdk/EMMessageWrapper.java b/android/src/main/java/com/easemob/im_flutter_sdk/EMMessageWrapper.java index 583a0cf4..457087b8 100644 --- a/android/src/main/java/com/easemob/im_flutter_sdk/EMMessageWrapper.java +++ b/android/src/main/java/com/easemob/im_flutter_sdk/EMMessageWrapper.java @@ -51,8 +51,10 @@ private void reactionList(JSONObject params, String channelName, MethodChannel.R ArrayList> list = new ArrayList<>(); if (msg != null) { List reactions = msg.getMessageReaction(); - for (int i = 0; i < reactions.size(); i++) { - list.add(EMMessageReactionHelper.toJson(reactions.get(i))); + if (reactions != null) { + for (int i = 0; i < reactions.size(); i++) { + list.add(EMMessageReactionHelper.toJson(reactions.get(i))); + } } } onSuccess(result, channelName, list);