diff options
author | Nadia Barbosa <captainbarbosa@users.noreply.github.com> | 2018-03-22 10:47:22 -0700 |
---|---|---|
committer | Nadia Barbosa <captainbarbosa@users.noreply.github.com> | 2018-03-22 10:47:22 -0700 |
commit | ac2ffcd20239c4eb77b38723b0f71da6fee537f9 (patch) | |
tree | bedc6ff5ace1cf355c7fbc08550dc3e9c9386ce8 | |
parent | 3de108ec2f244abd5605541394867459e751498c (diff) | |
download | qtlocation-mapboxgl-upstream/pin-annotation-nb.tar.gz |
Protect against superclass initializer failureupstream/pin-annotation-nb
-rw-r--r-- | platform/ios/src/MGLPinAnnotationView.m | 13 |
1 files 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; } |