summaryrefslogtreecommitdiff
path: root/platform/darwin/src/MGLStyle.mm
diff options
context:
space:
mode:
Diffstat (limited to 'platform/darwin/src/MGLStyle.mm')
-rw-r--r--platform/darwin/src/MGLStyle.mm3
1 files changed, 2 insertions, 1 deletions
diff --git a/platform/darwin/src/MGLStyle.mm b/platform/darwin/src/MGLStyle.mm
index 3f9bfbf8ca..ad47cb0155 100644
--- a/platform/darwin/src/MGLStyle.mm
+++ b/platform/darwin/src/MGLStyle.mm
@@ -177,7 +177,8 @@ static_assert(6 == mbgl::util::default_styles::numOrderedStyles,
}
- (MGLSource *)sourceFromMBGLSource:(mbgl::style::Source *)rawSource {
- if (MGLSource *source = rawSource->peer.has_value() ? mbgl::util::any_cast<SourceWrapper>(rawSource->peer).source : nil) {
+ if (rawSource->peer.has_value()) {
+ MGLSource* source = mbgl::util::any_cast<SourceWrapper>(&(rawSource->peer))->source;
return source;
}