mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-23 20:48:43 +00:00
Fix potential NPE in MediaOverviewPageFragment.
This commit is contained in:
committed by
Clark Chen
parent
159f2ebec0
commit
c359207f1f
@@ -211,9 +211,11 @@ public final class MediaOverviewPageFragment extends Fragment
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
int childCount = recyclerView.getChildCount();
|
||||
for (int i = 0; i < childCount; i++) {
|
||||
adapter.detach(recyclerView.getChildViewHolder(recyclerView.getChildAt(i)));
|
||||
if (recyclerView != null) {
|
||||
int childCount = recyclerView.getChildCount();
|
||||
for (int i = 0; i < childCount; i++) {
|
||||
adapter.detach(recyclerView.getChildViewHolder(recyclerView.getChildAt(i)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user