more safe return when no selection

This commit is contained in:
Justin R. Miller
2015-03-22 10:45:47 -07:00
parent fbd90ff48a
commit 8b21104eba

View File

@@ -1652,7 +1652,7 @@ CLLocationCoordinate2D latLngToCoordinate(mbgl::LatLng latLng)
- (NSArray *)selectedAnnotations
{
return @[ self.selectedAnnotation ];
return (self.selectedAnnotation ? @[ self.selectedAnnotation ] : @[]);
}
- (void)setSelectedAnnotations:(NSArray *)selectedAnnotations