From 6c837186887059cf159352ba6d0dd0f841537fc2 Mon Sep 17 00:00:00 2001 From: Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> Date: Wed, 3 May 2023 21:13:06 +0800 Subject: Fix https://github.com/Docile-Alligator/Infinity-For-Reddit/issues/1450 --- .../activities/ViewPrivateMessagesActivity.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'app/src/main/java') diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewPrivateMessagesActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewPrivateMessagesActivity.java index 77df7de1..46656aa4 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewPrivateMessagesActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewPrivateMessagesActivity.java @@ -334,10 +334,12 @@ public class ViewPrivateMessagesActivity extends BaseActivity implements Activit privateMessage = passPrivateMessageEvent.message; if (privateMessage != null) { if (privateMessage.getAuthor().equals(mAccountName)) { - for (int i = privateMessage.getReplies().size() - 1; i >= 0; i--) { - if (!privateMessage.getReplies().get(i).getAuthor().equals(mAccountName)) { - replyTo = privateMessage.getReplies().get(i); - break; + if (privateMessage.getReplies() != null) { + for (int i = privateMessage.getReplies().size() - 1; i >= 0; i--) { + if (!privateMessage.getReplies().get(i).getAuthor().equals(mAccountName)) { + replyTo = privateMessage.getReplies().get(i); + break; + } } } if (replyTo == null) { -- cgit v1.2.3