Browse Source

Null check. Fixes https://github.com/austinhuang0131/barinsta/issues/863

renovate/org.robolectric-robolectric-4.x
Ammar Githam 4 years ago
parent
commit
8f72796891
  1. 5
      app/src/main/java/awais/instagrabber/managers/ThreadManager.java

5
app/src/main/java/awais/instagrabber/managers/ThreadManager.java

@ -264,7 +264,10 @@ public final class ThreadManager {
} }
private List<User> getUsersWithCurrentUser(final DirectThread t) { private List<User> getUsersWithCurrentUser(final DirectThread t) {
final ImmutableList.Builder<User> builder = ImmutableList.<User>builder().add(currentUser);
final ImmutableList.Builder<User> builder = ImmutableList.<User>builder();
if (currentUser != null) {
builder.add(currentUser);
}
final List<User> users = t.getUsers(); final List<User> users = t.getUsers();
if (users != null) { if (users != null) {
builder.addAll(users); builder.addAll(users);

Loading…
Cancel
Save