diff --git a/app/src/main/java/eu/faircode/email/FragmentMessages.java b/app/src/main/java/eu/faircode/email/FragmentMessages.java index 7d57da28d9..1c18988cdc 100644 --- a/app/src/main/java/eu/faircode/email/FragmentMessages.java +++ b/app/src/main/java/eu/faircode/email/FragmentMessages.java @@ -474,7 +474,8 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences. DividerItemDecoration itemDecorator = new DividerItemDecoration(getContext(), llm.getOrientation()) { @Override public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) { - if (view.findViewById(R.id.clItem).getVisibility() == View.GONE) + View clItem = view.findViewById(R.id.clItem); + if (clItem == null || clItem.getVisibility() == View.GONE) outRect.setEmpty(); else super.getItemOffsets(outRect, view, parent, state);