Fix for NPE when place picker name is unavailable

Fixes #6671
// FREEBIE
This commit is contained in:
Moxie Marlinspike 2017-05-24 10:03:35 -07:00
parent 782bd6003b
commit 4dd5a92817

View File

@ -20,10 +20,10 @@ public class SignalPlace {
private static final String TAG = SignalPlace.class.getSimpleName(); private static final String TAG = SignalPlace.class.getSimpleName();
@JsonProperty @JsonProperty
private String name; private CharSequence name;
@JsonProperty @JsonProperty
private String address; private CharSequence address;
@JsonProperty @JsonProperty
private double latitude; private double latitude;
@ -32,8 +32,8 @@ public class SignalPlace {
private double longitude; private double longitude;
public SignalPlace(Place place) { public SignalPlace(Place place) {
this.name = place.getName().toString(); this.name = place.getName();
this.address = place.getAddress().toString(); this.address = place.getAddress();
this.latitude = place.getLatLng().latitude; this.latitude = place.getLatLng().latitude;
this.longitude = place.getLatLng().longitude; this.longitude = place.getLatLng().longitude;
} }