Skip to content

Commit b870c0b

Browse files
salah-ghanimrborn
authored andcommitted
r2507: remove marker: Attempt to invoke virtual method 'void com.google.android.gms.maps.model.setIcon(com.google.android.gms.maps.model.BitmapDescription)' on a null object reference #: remove marker: Attempt to invoke virtual method 'void com.google.android.gms.maps.model.setIcon(com.google.android.gms.maps.model.BitmapDescription)' on a null object reference (#2555)
* null check is enough
1 parent 5180a93 commit b870c0b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/android/src/main/java/com/airbnb/android/react/maps/AirMapMarker.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -285,8 +285,9 @@ public void updateMarkerIcon() {
285285
// No more updates for this, as it's a simple icon
286286
hasViewChanges = false;
287287
}
288-
289-
marker.setIcon(getIcon());
288+
if (marker != null) {
289+
marker.setIcon(getIcon());
290+
}
290291
}
291292

292293
public LatLng interpolate(float fraction, LatLng a, LatLng b) {

0 commit comments

Comments
 (0)