[osx] Fixed static analyzer warnings

This commit is contained in:
Minh Nguyễn
2016-01-14 15:37:37 -08:00
committed by Minh Nguyễn
parent b52b634e5b
commit 714dfab8ae
2 changed files with 2 additions and 2 deletions

View File

@@ -442,7 +442,7 @@ IB_DESIGNABLE
/** Deselects an annotation and hides its callout popover.
@param annotation The annotation object to deselect. */
- (void)deselectAnnotation:(id <MGLAnnotation>)annotation;
- (void)deselectAnnotation:(nullable id <MGLAnnotation>)annotation;
/** A common view controller for managing a callout popover’s content view.

View File

@@ -1929,7 +1929,7 @@ public:
- (void)popoverDidShow:(__unused NSNotification *)notification {
id <MGLAnnotation> annotation = self.selectedAnnotation;
if ([self.delegate respondsToSelector:@selector(mapView:didSelectAnnotation:)]) {
if (annotation && [self.delegate respondsToSelector:@selector(mapView:didSelectAnnotation:)]) {
[self.delegate mapView:self didSelectAnnotation:annotation];
}
}