summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Guerra Soto <fabian.guerra@mapbox.com>2017-03-28 16:06:16 -0400
committerGitHub <noreply@github.com>2017-03-28 16:06:16 -0400
commitc5c69102c5ca1aabb0efda1fe64224256a56bbb1 (patch)
treede0fe88d61317640ecbe210e237208db4698044a
parent8c34a5081c883eb7f4871b8e2c26f32b786ee8e4 (diff)
downloadqtlocation-mapboxgl-c5c69102c5ca1aabb0efda1fe64224256a56bbb1.tar.gz
[ios] nil check in visibleAnnotationsInRect to avoid crash (#8513)
-rw-r--r--platform/ios/src/MGLMapView.mm5
1 files changed, 4 insertions, 1 deletions
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];