diff --git a/platform/ios/MGLMapView.mm b/platform/ios/MGLMapView.mm index 2608e4a00..8593e9da5 100644 --- a/platform/ios/MGLMapView.mm +++ b/platform/ios/MGLMapView.mm @@ -1652,7 +1652,7 @@ CLLocationCoordinate2D latLngToCoordinate(mbgl::LatLng latLng) - (NSArray *)selectedAnnotations { - return @[ self.selectedAnnotation ]; + return (self.selectedAnnotation ? @[ self.selectedAnnotation ] : @[]); } - (void)setSelectedAnnotations:(NSArray *)selectedAnnotations