summaryrefslogtreecommitdiff
path: root/platform/ios/src/MGLAnnotationView.mm
diff options
context:
space:
mode:
Diffstat (limited to 'platform/ios/src/MGLAnnotationView.mm')
-rw-r--r--platform/ios/src/MGLAnnotationView.mm5
1 files changed, 4 insertions, 1 deletions
diff --git a/platform/ios/src/MGLAnnotationView.mm b/platform/ios/src/MGLAnnotationView.mm
index 0e904779d5..5e0ae3b848 100644
--- a/platform/ios/src/MGLAnnotationView.mm
+++ b/platform/ios/src/MGLAnnotationView.mm
@@ -239,7 +239,10 @@
}
else if (dragState == MGLAnnotationViewDragStateCanceling)
{
- NSAssert(self.annotation, @"Annotation property should not be nil.");
+ if (!self.annotation) {
+ [NSException raise:NSInvalidArgumentException
+ format:@"Annotation property should not be nil."];
+ }
self.panGestureRecognizer.enabled = NO;
self.longPressRecognizer.enabled = NO;
self.center = [self.mapView convertCoordinate:self.annotation.coordinate toPointToView:self.mapView];