Skip to content

Commit

Permalink
fix: fix null-check in MapView#zoom
Browse files Browse the repository at this point in the history
  • Loading branch information
hansemannn committed Aug 2, 2019
1 parent 5e6f870 commit bf2373e
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions android/src/ti/map/ViewProxy.java
Original file line number Diff line number Diff line change
Expand Up @@ -1149,11 +1149,16 @@ public float getZoom()
private float handleGetZoom()
{
TiUIView view = peekView();

if (view instanceof TiUIMapView) {
return ((TiUIMapView) view).getMap().getCameraPosition().zoom;
} else {
return 0;
GoogleMap mapView = ((TiUIMapView) view).getMap();

if (mapView != null) {
return mapView.getCameraPosition().zoom;
}
}

return 0;
}

@Kroll.method
Expand Down

0 comments on commit bf2373e

Please sign in to comment.