Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
[android] - validate Marker before opening InfoWindow
Browse files Browse the repository at this point in the history
  • Loading branch information
tobrun committed Jul 24, 2017
1 parent c0efad5 commit e8ad7b6
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.mapbox.mapboxsdk.maps;

import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.text.TextUtils;

Expand Down Expand Up @@ -55,8 +54,8 @@ boolean isAllowConcurrentMultipleOpenInfoWindows() {
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) {
Expand Down

0 comments on commit e8ad7b6

Please sign in to comment.