summaryrefslogtreecommitdiff
path: root/platform/android/MapboxGLAndroidSDK
diff options
context:
space:
mode:
Diffstat (limited to 'platform/android/MapboxGLAndroidSDK')
-rwxr-xr-xplatform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/NativeMapView.java13
1 files changed, 9 insertions, 4 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/NativeMapView.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/NativeMapView.java
index c2aed13ddd..f7086ac712 100755
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/NativeMapView.java
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/NativeMapView.java
@@ -1047,10 +1047,15 @@ final class NativeMapView implements NativeMap {
if (checkState("OnSnapshotReady")) {
return;
}
-
- Bitmap viewContent = viewCallback.getViewContent();
- if (snapshotReadyCallback != null && mapContent != null && viewContent != null) {
- snapshotReadyCallback.onSnapshotReady(BitmapUtils.mergeBitmap(mapContent, viewContent));
+ if (snapshotReadyCallback != null && mapContent != null) {
+ if (viewCallback == null) {
+ snapshotReadyCallback.onSnapshotReady(mapContent);
+ } else {
+ Bitmap viewContent = viewCallback.getViewContent();
+ if (viewContent != null) {
+ snapshotReadyCallback.onSnapshotReady(BitmapUtils.mergeBitmap(mapContent, viewContent));
+ }
+ }
}
}