mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 12:23:58 +01:00
On taking a look at the following stack trace: java.lang.NullPointerException: Attempt to invoke interface method 'java.util.Iterator java.util.List.iterator()' on a null object reference at fr.free.nrw.commons.nearby.fragments.NearbyParentFragment.updatePlaceList(NearbyParentFragment.java:777) at fr.free.nrw.commons.nearby.fragments.NearbyParentFragment.lambda$initFilterChips$10$NearbyParentFragment(NearbyParentFragment.java:730) at fr.free.nrw.commons.nearby.fragments.-$$Lambda$NearbyParentFragment$AGol6SoJlvIYd45Vbz6tTjDiWU4.onCheckedChanged(Unknown Source:2) at android.widget.CompoundButton.setChecked(CompoundButton.java:235) at com.google.android.material.chip.Chip.setChecked(Chip.java:665) at android.widget.CompoundButton.toggle(CompoundButton.java:150) ... ... it seems clear the 'places' list is trying to be iterated in the updatePlaceList method when it is empty. This is resulting in an NPE and consequently an app crash. Avoid the same by ensuring it is always initialized to an empty list. |
||
|---|---|---|
| .. | ||
| src | ||
| build.gradle | ||
| proguard-rules.txt | ||
| test-proguard-rules.txt | ||