Prevent crash

This commit is contained in:
M66B 2020-01-06 09:02:54 +01:00
parent dc69b597ab
commit 75f6d118a2
1 changed files with 1 additions and 1 deletions

View File

@ -4440,7 +4440,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
} }
public void onItemSelected(@NonNull ViewHolder holder, boolean selected) { public void onItemSelected(@NonNull ViewHolder holder, boolean selected) {
if (accessibility) { if (accessibility && holder.view != null) {
AccessibilityEvent event = AccessibilityEvent.obtain(); AccessibilityEvent event = AccessibilityEvent.obtain();
holder.view.onInitializeAccessibilityEvent(event); holder.view.onInitializeAccessibilityEvent(event);
event.setEventType(AccessibilityEvent.TYPE_VIEW_SELECTED); event.setEventType(AccessibilityEvent.TYPE_VIEW_SELECTED);