summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorTobrun <tobrun.van.nuland@gmail.com>2018-02-02 10:30:05 +0100
committerTobrun <tobrun@mapbox.com>2018-02-05 09:59:24 +0100
commitd0309a3137e5dd5b52d761d9ff675390f5417235 (patch)
tree93e7bd61aefc7101285b799fe805f1a7bd72794d /platform
parente2a4dffcb627498561d66a304ec668f8242b8342 (diff)
downloadqtlocation-mapboxgl-d0309a3137e5dd5b52d761d9ff675390f5417235.tar.gz
[android] - don't invoke onLowMemory on map when the map isn't fully created yet
Diffstat (limited to 'platform')
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java
index 2e7d4c4270..a54a84f83b 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java
@@ -486,7 +486,9 @@ public class MapView extends FrameLayout {
*/
@UiThread
public void onLowMemory() {
- nativeMapView.onLowMemory();
+ if (nativeMapView != null) {
+ nativeMapView.onLowMemory();
+ }
}
/**