Skip to content

Commit

Permalink
fix: fix null-handler 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 7e29149
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 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;

if (view instanceof TiUIMapView {
GoogleMap mapView = ((TiUIMapView) view).getMap();

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

return 0;
}

@Kroll.method
Expand Down

0 comments on commit 7e29149

Please sign in to comment.