Skip to content
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.

Commit

Permalink
Address crash when localFontFamilyName is nil (#467)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmkiley authored Sep 21, 2020
1 parent df54f58 commit d6190f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion platform/ios/src/MGLMapView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::string> localFontFamilyName = config.localFontFamilyName ? mbgl::optional<std::string>(std::string(config.localFontFamilyName.UTF8String)) : mbgl::nullopt;
auto renderer = std::make_unique<mbgl::Renderer>(_mbglView->getRendererBackend(), config.scaleFactor, localFontFamilyName);
BOOL enableCrossSourceCollisions = !config.perSourceCollisions;
_rendererFrontend = std::make_unique<MGLRenderFrontend>(std::move(renderer), self, _mbglView->getRendererBackend());
Expand Down

0 comments on commit d6190f5

Please sign in to comment.