Skip to content

Commit

Permalink
Attempt to fix occasional crashes on android
Browse files Browse the repository at this point in the history
  • Loading branch information
IjzerenHein committed Sep 21, 2016
1 parent 70a6c8a commit 14ca6f7
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ public class AirMapView extends MapView implements GoogleMap.InfoWindowAdapter,
private final AirMapManager manager;
private LifecycleEventListener lifecycleListener;
private boolean paused = false;
private boolean destroyed = false;
private final ThemedReactContext context;
private final EventDispatcher eventDispatcher;

Expand Down Expand Up @@ -269,7 +270,10 @@ public synchronized void doDestroy() {
if (!paused) {
onPause();
}
onDestroy();
if (!destroyed) {
destroyed = true;
onDestroy();
}
}

public void setRegion(ReadableMap region) {
Expand Down

0 comments on commit 14ca6f7

Please sign in to comment.