diff --git a/mastodon/src/main/java/org/joinmastodon/android/fragments/BaseStatusListFragment.java b/mastodon/src/main/java/org/joinmastodon/android/fragments/BaseStatusListFragment.java index af6f9dbd..a20a0864 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/fragments/BaseStatusListFragment.java +++ b/mastodon/src/main/java/org/joinmastodon/android/fragments/BaseStatusListFragment.java @@ -216,7 +216,8 @@ public abstract class BaseStatusListFragment exten view.setScaleX(1f); view.setScaleY(1f); transitioningHolder.itemView.setElevation(0f); - list.setClipChildren(true); + if(list!=null) + list.setClipChildren(true); transitioningHolder=null; } @@ -596,6 +597,8 @@ public abstract class BaseStatusListFragment exten @Override public ImageLoaderRequest getImageRequest(int position, int image){ + if(position>=displayItems.size()) // TODO fix this in the image loader, these crashes are driving me crazy + return null; return displayItems.get(position).getImageRequest(image); } diff --git a/mastodon/src/main/java/org/joinmastodon/android/fragments/discover/DiscoverAccountsFragment.java b/mastodon/src/main/java/org/joinmastodon/android/fragments/discover/DiscoverAccountsFragment.java index 7b77b518..05970bd0 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/fragments/discover/DiscoverAccountsFragment.java +++ b/mastodon/src/main/java/org/joinmastodon/android/fragments/discover/DiscoverAccountsFragment.java @@ -107,6 +107,8 @@ public class DiscoverAccountsFragment extends BaseRecyclerFragment result){ relationshipsRequest=null; relationships=result.stream().collect(Collectors.toMap(rel->rel.id, Function.identity())); + if(list==null) + return; for(int i=0;i