Skip to content

Commit affac35

Browse files
Attempt to fix crashes. A variant of react-native-maps/react-native-maps#1403 but for another lifecycle method, as proposed by @Nelrohd. (#1464)
1 parent a81a41a commit affac35

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,9 @@ public void onHostResume() {
304304
map.setMyLocationEnabled(showUserLocation);
305305
}
306306
synchronized (AirMapView.this) {
307-
AirMapView.this.onResume();
307+
if (!destroyed) {
308+
AirMapView.this.onResume();
309+
}
308310
paused = false;
309311
}
310312
}

0 commit comments

Comments
 (0)