From 8b21104eba0aea267c03c5a49c8709f9cb103646 Mon Sep 17 00:00:00 2001 From: "Justin R. Miller" Date: Sun, 22 Mar 2015 10:45:47 -0700 Subject: [PATCH] more safe return when no selection --- platform/ios/MGLMapView.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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