mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 04:43:54 +01:00
Add check to prevent NPE
This commit is contained in:
parent
0d114a66a2
commit
f40875eb7d
1 changed files with 5 additions and 2 deletions
|
|
@ -82,8 +82,11 @@ public class NearbyListFragment extends DaggerFragment {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateNearbyListSignificantly() {
|
public void updateNearbyListSignificantly() {
|
||||||
adapterFactory.updateAdapterData(getPlaceListFromBundle(bundleForUpdates),
|
try {
|
||||||
(RVRendererAdapter<Place>) recyclerView.getAdapter());
|
adapterFactory.updateAdapterData(getPlaceListFromBundle(bundleForUpdates), (RVRendererAdapter<Place>) recyclerView.getAdapter());
|
||||||
|
} catch (NullPointerException e) {
|
||||||
|
Timber.e("Null pointer exception from calling recyclerView.getAdapter()");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<Place> getPlaceListFromBundle(Bundle bundle) {
|
private List<Place> getPlaceListFromBundle(Bundle bundle) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue