diff options
Diffstat (limited to 'platform/android/src/map/camera_position.cpp')
-rw-r--r-- | platform/android/src/map/camera_position.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/platform/android/src/map/camera_position.cpp b/platform/android/src/map/camera_position.cpp index 1fc5f9789f..01ffc6530b 100644 --- a/platform/android/src/map/camera_position.cpp +++ b/platform/android/src/map/camera_position.cpp @@ -33,7 +33,9 @@ mbgl::CameraOptions CameraPosition::getCameraOptions(jni::JNIEnv& env, jni::Obje static auto tilt = CameraPosition::javaClass.GetField<jni::jdouble>(env, "tilt"); static auto zoom = CameraPosition::javaClass.GetField<jni::jdouble>(env, "zoom"); - auto center = LatLng::getLatLng(env, position.Get(env, target)); + auto jtarget = position.Get(env, target); + auto center = LatLng::getLatLng(env, jtarget); + jni::DeleteLocalRef(env, jtarget); return mbgl::CameraOptions { center, |