diff options
Diffstat (limited to 'platform')
-rw-r--r-- | platform/android/src/native_map_view.cpp | 4 | ||||
-rw-r--r-- | platform/darwin/src/MGLStyle.mm | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/platform/android/src/native_map_view.cpp b/platform/android/src/native_map_view.cpp index 604fdbe2ae..db30d87a5b 100644 --- a/platform/android/src/native_map_view.cpp +++ b/platform/android/src/native_map_view.cpp @@ -1099,8 +1099,8 @@ void NativeMapView::removeImage(JNIEnv& env, const jni::String& name) { } jni::Local<jni::Object<Bitmap>> NativeMapView::getImage(JNIEnv& env, const jni::String& name) { - if (auto* image = map->getStyle().getImage(jni::Make<std::string>(env, name))) { - return Bitmap::CreateBitmap(env, *image); + if (auto image = map->getStyle().getImage(jni::Make<std::string>(env, name))) { + return Bitmap::CreateBitmap(env, image->getImage()); } return jni::Local<jni::Object<Bitmap>>(); } diff --git a/platform/darwin/src/MGLStyle.mm b/platform/darwin/src/MGLStyle.mm index cab0eaae28..6a496dc3c0 100644 --- a/platform/darwin/src/MGLStyle.mm +++ b/platform/darwin/src/MGLStyle.mm @@ -528,7 +528,7 @@ static_assert(6 == mbgl::util::default_styles::numOrderedStyles, } auto styleImage = self.rawStyle->getImage([name UTF8String]); - return styleImage ? [[MGLImage alloc] initWithMGLStyleImage:styleImage] : nil; + return styleImage ? [[MGLImage alloc] initWithMGLStyleImage:&(*styleImage)] : nil; } #pragma mark Style transitions |