From 7e2914930dd92570a215bee8b6c50f3cf4b2bd3f Mon Sep 17 00:00:00 2001 From: hansemannn Date: Fri, 2 Aug 2019 10:51:28 +0200 Subject: [PATCH] fix: fix null-handler in mapView.zoom --- android/src/ti/map/ViewProxy.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/android/src/ti/map/ViewProxy.java b/android/src/ti/map/ViewProxy.java index ea8026a7..a95db0f1 100644 --- a/android/src/ti/map/ViewProxy.java +++ b/android/src/ti/map/ViewProxy.java @@ -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