diff --git a/package.json b/package.json index 5c1eb49..47667e6 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "version": "1.2.0", + "version": "1.2.1", "name": "cordova-plugin-mapbox", "cordova_name": "Mapbox", "description": "Need native maps? Look no further!", diff --git a/plugin.xml b/plugin.xml index f2d6d31..040be30 100755 --- a/plugin.xml +++ b/plugin.xml @@ -2,7 +2,7 @@ + version="1.2.1"> Mapbox diff --git a/src/android/Mapbox.java b/src/android/Mapbox.java index 029fe92..e9363e3 100644 --- a/src/android/Mapbox.java +++ b/src/android/Mapbox.java @@ -488,14 +488,20 @@ public void onRequestPermissionResult(int requestCode, String[] permissions, int } public void onPause(boolean multitasking) { - mapView.onPause(); + if (mapView != null) { + mapView.onPause(); + } } public void onResume(boolean multitasking) { - mapView.onResume(); + if (mapView != null) { + mapView.onResume(); + } } public void onDestroy() { - mapView.onDestroy(); + if (mapView != null) { + mapView.onDestroy(); + } } }