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 28, 2017
1 parent beaee93 commit 635a3f2
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 635a3f2

Please sign in to comment.