Skip to content

Commit

Permalink
skip region monitoring if map object is null (react-native-maps#1443)
Browse files Browse the repository at this point in the history
This happen if google play services version is lower than required
  • Loading branch information
mattshen authored and Masu Lin committed Aug 7, 2017
1 parent 34d78bf commit e69ca4e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -701,13 +701,13 @@ public boolean dispatchTouchEvent(MotionEvent ev) {
// Timer Implementation

public void startMonitoringRegion() {
if (isMonitoringRegion) return;
if (map == null || isMonitoringRegion) return;
timerHandler.postDelayed(timerRunnable, 100);
isMonitoringRegion = true;
}

public void stopMonitoringRegion() {
if (!isMonitoringRegion) return;
if (map == null || !isMonitoringRegion) return;
timerHandler.removeCallbacks(timerRunnable);
isMonitoringRegion = false;
}
Expand Down

0 comments on commit e69ca4e

Please sign in to comment.