From 4dd5a928173b4e01497f6ec762fdbdd5813a38f8 Mon Sep 17 00:00:00 2001 From: Moxie Marlinspike Date: Wed, 24 May 2017 10:03:35 -0700 Subject: [PATCH] Fix for NPE when place picker name is unavailable Fixes #6671 // FREEBIE --- .../securesms/components/location/SignalPlace.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/org/thoughtcrime/securesms/components/location/SignalPlace.java b/src/org/thoughtcrime/securesms/components/location/SignalPlace.java index 64dcc48702..ac68fd34e5 100644 --- a/src/org/thoughtcrime/securesms/components/location/SignalPlace.java +++ b/src/org/thoughtcrime/securesms/components/location/SignalPlace.java @@ -20,10 +20,10 @@ public class SignalPlace { private static final String TAG = SignalPlace.class.getSimpleName(); @JsonProperty - private String name; + private CharSequence name; @JsonProperty - private String address; + private CharSequence address; @JsonProperty private double latitude; @@ -32,8 +32,8 @@ public class SignalPlace { private double longitude; public SignalPlace(Place place) { - this.name = place.getName().toString(); - this.address = place.getAddress().toString(); + this.name = place.getName(); + this.address = place.getAddress(); this.latitude = place.getLatLng().latitude; this.longitude = place.getLatLng().longitude; }