summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobrun Van Nuland <tobrun.van.nuland@gmail.com>2017-07-24 11:05:29 +0200
committerTobrun <tobrun@mapbox.com>2017-07-24 13:40:21 +0200
commite8ad7b6a49d12a1f414e0242007a671c4514d85a (patch)
tree7eac4932250bf53b42e74336b79994be8747207f
parentc0efad5de22e50a2f2d541a62a07b0786cde0202 (diff)
downloadqtlocation-mapboxgl-e8ad7b6a49d12a1f414e0242007a671c4514d85a.tar.gz
[android] - validate Marker before opening InfoWindow
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/InfoWindowManager.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/InfoWindowManager.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/InfoWindowManager.java
index 0b461d1227..af207204d9 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/InfoWindowManager.java
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/InfoWindowManager.java
@@ -1,6 +1,5 @@
package com.mapbox.mapboxsdk.maps;
-import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.text.TextUtils;
@@ -55,8 +54,8 @@ class InfoWindowManager {
return allowConcurrentMultipleInfoWindows;
}
- boolean isInfoWindowValidForMarker(@NonNull Marker marker) {
- return !TextUtils.isEmpty(marker.getTitle()) || !TextUtils.isEmpty(marker.getSnippet());
+ boolean isInfoWindowValidForMarker(Marker marker) {
+ return marker != null && (!TextUtils.isEmpty(marker.getTitle()) || !TextUtils.isEmpty(marker.getSnippet()));
}
void setOnInfoWindowClickListener(@Nullable MapboxMap.OnInfoWindowClickListener listener) {