From c5c69102c5ca1aabb0efda1fe64224256a56bbb1 Mon Sep 17 00:00:00 2001 From: Fabian Guerra Soto Date: Tue, 28 Mar 2017 16:06:16 -0400 Subject: [ios] nil check in visibleAnnotationsInRect to avoid crash (#8513) --- platform/ios/src/MGLMapView.mm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm index 1baebf60bc..6ce41d6fb4 100644 --- a/platform/ios/src/MGLMapView.mm +++ b/platform/ios/src/MGLMapView.mm @@ -3044,7 +3044,10 @@ public: continue; } MGLAnnotationContext annotationContext = _annotationContextsByAnnotationTag.at(annotationTag); - [annotations addObject:annotationContext.annotation]; + if (annotationContext.annotation) + { + [annotations addObject:annotationContext.annotation]; + } } return [annotations copy]; -- cgit v1.2.1