forked from organicmaps/organicmaps
[search] Fix crash when searching coordinates
Signed-off-by: David Martinez <47610359+dvdmrtnz@users.noreply.github.com>
This commit is contained in:
parent
394d7d0014
commit
2360958ac5
2 changed files with 5 additions and 2 deletions
|
@ -111,7 +111,7 @@ jobject ToJavaResult(Result const & result, search::ProductInfo const & productI
|
|||
jni::TScopedLocalRef featureType(env, jni::ToJavaString(env, localizedType));
|
||||
jni::TScopedLocalRef address(env, jni::ToJavaString(env, result.GetAddress()));
|
||||
jni::TScopedLocalRef dist(env, ToJavaDistance(env, distance));
|
||||
jni::TScopedLocalRef description(env, jni::ToJavaString(env, result.GetFeatureDescription()));
|
||||
jni::TScopedLocalRef description(env, jni::ToJavaString(env, isFeature ? result.GetFeatureDescription() : ""));
|
||||
|
||||
jni::TScopedLocalRef desc(env, env->NewObject(g_descriptionClass, g_descriptionConstructor,
|
||||
featureId.get(), featureType.get(), address.get(),
|
||||
|
|
|
@ -32,7 +32,10 @@
|
|||
self.locationLabel.text = @(result.GetAddress().c_str());
|
||||
[self.locationLabel sizeToFit];
|
||||
|
||||
self.infoLabel.text = @(result.GetFeatureDescription().c_str());
|
||||
if (result.GetResultType() == search::Result::Type::Feature)
|
||||
self.infoLabel.text = @(result.GetFeatureDescription().c_str());
|
||||
else
|
||||
self.infoLabel.text = @("");
|
||||
|
||||
CLLocation * lastLocation = [MWMLocationManager lastLocation];
|
||||
double distanceInMeters = 0.0;
|
||||
|
|
Loading…
Add table
Reference in a new issue