Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Prevents NPE in PageResultsFragment
Browse files Browse the repository at this point in the history
  • Loading branch information
ecgreb committed Nov 5, 2014
1 parent 3c59986 commit 8037889
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -229,9 +229,11 @@ public void add(SimpleFeature simpleFeature) {
}

public void update(SimpleFeature simpleFeature) {
TextView address = (TextView) pager.findViewById(R.id.address);
address.setText(String.format(Locale.getDefault(), "%s, %s",
simpleFeature.getCity(), simpleFeature.getAdmin()));
if (pager != null) {
TextView address = (TextView) pager.findViewById(R.id.address);
address.setText(String.format(Locale.getDefault(), "%s, %s",
simpleFeature.getCity(), simpleFeature.getAdmin()));
}
}

public void setSearchResults(List<Feature> features) {
Expand Down

0 comments on commit 8037889

Please sign in to comment.