Skip to content

Commit

Permalink
Fixes google map null pointer exception (react-native-maps#1403)
Browse files Browse the repository at this point in the history
AirMapView doDestroy is called before LifecycleEventListener onHostPause. This fixes react-native-maps#1358
  • Loading branch information
chaitanya-bhagavan authored and Masu Lin committed Jun 19, 2017
1 parent 9036526 commit 5782bbf
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,9 @@ public void onHostPause() {
map.setMyLocationEnabled(false);
}
synchronized (AirMapView.this) {
AirMapView.this.onPause();
if(!destroyed) {
AirMapView.this.onPause();
}
paused = true;
}
}
Expand Down

0 comments on commit 5782bbf

Please sign in to comment.