diff options
author | Peng Liu <peng.liu@mapbox.com> | 2019-09-06 15:14:51 +0300 |
---|---|---|
committer | Peng Liu <peng.liu@mapbox.com> | 2019-09-06 15:14:51 +0300 |
commit | ca579a8ccbf514e7eb60dff732976ef55efa0f69 (patch) | |
tree | 06d2b19e27a5075e84ab67a7d7cc69c4288b5e80 | |
parent | 3605f31a126eade8d1565e902cc4f7e826b9d45a (diff) | |
download | qtlocation-mapboxgl-ca579a8ccbf514e7eb60dff732976ef55efa0f69.tar.gz |
[android] Add null check for camera position padding.
-rw-r--r-- | platform/android/src/map/camera_position.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/platform/android/src/map/camera_position.cpp b/platform/android/src/map/camera_position.cpp index 03aca79bda..cbf5f2e408 100644 --- a/platform/android/src/map/camera_position.cpp +++ b/platform/android/src/map/camera_position.cpp @@ -50,8 +50,8 @@ mbgl::CameraOptions CameraPosition::getCameraOptions(jni::JNIEnv& env, const jni return mbgl::CameraOptions { center, - EdgeInsets {padding.Get(env, 1) * pixelRatio, padding.Get(env, 0) * pixelRatio, - padding.Get(env, 3) * pixelRatio, padding.Get(env, 2) * pixelRatio}, + padding ? EdgeInsets {padding.Get(env, 1) * pixelRatio, padding.Get(env, 0) * pixelRatio, + padding.Get(env, 3) * pixelRatio, padding.Get(env, 2) * pixelRatio} : (EdgeInsets) {}, {}, position.Get(env, zoom), position.Get(env, bearing), |