diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm index 32dd674460..8cdac08770 100644 --- a/platform/ios/src/MGLMapView.mm +++ b/platform/ios/src/MGLMapView.mm @@ -556,7 +556,7 @@ - (void)commonInit // setup mbgl map MGLRendererConfiguration *config = [MGLRendererConfiguration currentConfiguration]; - auto localFontFamilyName = config.localFontFamilyName ? std::string(config.localFontFamilyName.UTF8String) : nullptr; + mbgl::optional localFontFamilyName = config.localFontFamilyName ? mbgl::optional(std::string(config.localFontFamilyName.UTF8String)) : mbgl::nullopt; auto renderer = std::make_unique(_mbglView->getRendererBackend(), config.scaleFactor, localFontFamilyName); BOOL enableCrossSourceCollisions = !config.perSourceCollisions; _rendererFrontend = std::make_unique(std::move(renderer), self, _mbglView->getRendererBackend());