diff options
author | Justin R. Miller <incanus@codesorcery.net> | 2015-08-11 15:10:55 -0700 |
---|---|---|
committer | Justin R. Miller <incanus@codesorcery.net> | 2015-08-11 15:10:55 -0700 |
commit | 01b5636df0f7fe885176ad4918d18c5aa12de11d (patch) | |
tree | 0129d2c1f07e5f06f5ec0acc072fca3746a2515d /platform | |
parent | aa06a9d58748b5ef9e9e979891d197f5a26c9fa8 (diff) | |
download | qtlocation-mapboxgl-01b5636df0f7fe885176ad4918d18c5aa12de11d.tar.gz |
fixes #1951: check for support of title before querying
Diffstat (limited to 'platform')
-rw-r--r-- | platform/ios/MGLMapView.mm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/platform/ios/MGLMapView.mm b/platform/ios/MGLMapView.mm index 3a517ddefd..8950663551 100644 --- a/platform/ios/MGLMapView.mm +++ b/platform/ios/MGLMapView.mm @@ -2047,7 +2047,9 @@ CLLocationCoordinate2D MGLLocationCoordinate2DFromLatLng(mbgl::LatLng latLng) self.selectedAnnotation = annotation; - if (annotation.title && [self.delegate respondsToSelector:@selector(mapView:annotationCanShowCallout:)] && + if ([annotation respondsToSelector:@selector(title)] && + annotation.title && + [self.delegate respondsToSelector:@selector(mapView:annotationCanShowCallout:)] && [self.delegate mapView:self annotationCanShowCallout:annotation]) { // build the callout |