diff options
author | Fabian Guerra Soto <fabian.guerra@mapbox.com> | 2017-03-28 16:06:16 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-28 16:06:16 -0400 |
commit | c5c69102c5ca1aabb0efda1fe64224256a56bbb1 (patch) | |
tree | de0fe88d61317640ecbe210e237208db4698044a /platform/ios/src | |
parent | 8c34a5081c883eb7f4871b8e2c26f32b786ee8e4 (diff) | |
download | qtlocation-mapboxgl-c5c69102c5ca1aabb0efda1fe64224256a56bbb1.tar.gz |
[ios] nil check in visibleAnnotationsInRect to avoid crash (#8513)
Diffstat (limited to 'platform/ios/src')
-rw-r--r-- | platform/ios/src/MGLMapView.mm | 5 |
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]; |