summaryrefslogtreecommitdiff
path: root/platform/ios/src/MGLMapView.mm
diff options
context:
space:
mode:
authorFabian Guerra Soto <fabian.guerra@mapbox.com>2017-04-05 14:16:58 -0400
committerGitHub <noreply@github.com>2017-04-05 14:16:58 -0400
commitec34813c905566bfb7a388a9d905d1e20711dc17 (patch)
treedc8c8b0d9e4bf0731025aa877aaafb315ab53a43 /platform/ios/src/MGLMapView.mm
parent8539d7092ee0dc584f6dd7f664d49ee96d4ddf0e (diff)
downloadqtlocation-mapboxgl-ec34813c905566bfb7a388a9d905d1e20711dc17.tar.gz
[ios] assertion to check if an annotationTag > 0 (#8588)
* [ios] assertion to check if an annotationTag > 0 * [ios,macos] assertion and guard added to check annotations in visibleAnnotationsInRect
Diffstat (limited to 'platform/ios/src/MGLMapView.mm')
-rw-r--r--platform/ios/src/MGLMapView.mm2
1 files changed, 2 insertions, 0 deletions
diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm
index 6f51d4b523..ef4326556b 100644
--- a/platform/ios/src/MGLMapView.mm
+++ b/platform/ios/src/MGLMapView.mm
@@ -3060,10 +3060,12 @@ public:
continue;
}
MGLAnnotationContext annotationContext = _annotationContextsByAnnotationTag.at(annotationTag);
+ NSAssert(annotationContext.annotation, @"Missing annotation for tag %u.", annotationTag);
if (annotationContext.annotation)
{
[annotations addObject:annotationContext.annotation];
}
+
}
return [annotations copy];