From ac2ffcd20239c4eb77b38723b0f71da6fee537f9 Mon Sep 17 00:00:00 2001 From: Nadia Barbosa Date: Thu, 22 Mar 2018 10:47:22 -0700 Subject: Protect against superclass initializer failure --- platform/ios/src/MGLPinAnnotationView.m | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/platform/ios/src/MGLPinAnnotationView.m b/platform/ios/src/MGLPinAnnotationView.m index 62362afc79..4d32a57472 100644 --- a/platform/ios/src/MGLPinAnnotationView.m +++ b/platform/ios/src/MGLPinAnnotationView.m @@ -3,12 +3,13 @@ @implementation MGLPinAnnotationView - (instancetype)initWithReuseIdentifier:(nullable NSString *)reuseIdentifier { - self = [super initWithReuseIdentifier:reuseIdentifier]; - _shadowColor = [UIColor blackColor]; - _pinColor = [UIColor blueColor]; - _strokeColor = [UIColor whiteColor]; - _innerColor = [UIColor whiteColor]; - self.backgroundColor = [UIColor clearColor]; + if (self = [super initWithReuseIdentifier:reuseIdentifier]) { + _shadowColor = [UIColor blackColor]; + _pinColor = [UIColor blueColor]; + _strokeColor = [UIColor yellowColor]; + _innerColor = [UIColor whiteColor]; + self.backgroundColor = [UIColor clearColor]; + } return self; } -- cgit v1.2.1