Accounting for null values in geofavorite name and content
This commit is contained in:
parent
db4d1314eb
commit
2b5cba0dea
@ -118,9 +118,9 @@ public class GeofavoriteAdapter extends RecyclerView.Adapter<GeofavoriteAdapter.
|
||||
} else {
|
||||
for (Geofavorite geofavorite : geofavoriteList) {
|
||||
String query = charSequence.toString().toLowerCase();
|
||||
if (geofavorite.getName().toLowerCase().contains(query)) {
|
||||
if (geofavorite.getName() != null && geofavorite.getName().toLowerCase().contains(query)) {
|
||||
filteredGeofavorites.add(geofavorite);
|
||||
} else if (geofavorite.getComment().toLowerCase().contains(query)) {
|
||||
} else if (geofavorite.getComment() != null && geofavorite.getComment().toLowerCase().contains(query)) {
|
||||
filteredGeofavorites.add(geofavorite);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user