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

Commit

Permalink
[android] fix added to map checks because LongSparseArray#indexOfKey …
Browse files Browse the repository at this point in the history
…could return a negative number when the specified key is not mapped (#9602)
  • Loading branch information
Guardiola31337 authored and tobrun committed Jul 26, 2017
1 parent dc3c7ad commit bc9ed98
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ void updateMarker(@NonNull Marker updatedMarker) {
}

private boolean isAddedToMap(Annotation annotation) {
return annotation != null && annotation.getId() != -1 && annotations.indexOfKey(annotation.getId()) != -1;
return annotation != null && annotation.getId() != -1 && annotations.indexOfKey(annotation.getId()) > -1;
}

private void ensureIconLoaded(Marker marker) {
Expand Down

0 comments on commit bc9ed98

Please sign in to comment.