Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Commit ceef4d3

Browse files
committed
Merge pull request #1652 from mapbox/1ec5-init-nil
Return nil upon failure to initialize
2 parents 2ce4ae3 + a2986b2 commit ceef4d3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

platform/ios/MGLMapView.mm

+2-1
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,10 @@ - (instancetype)initWithFrame:(CGRect)frame styleURL:(NSURL *)styleURL
132132
if (self && [self commonInit])
133133
{
134134
self.styleURL = styleURL;
135+
return self;
135136
}
136137

137-
return self;
138+
return nil;
138139
}
139140

140141
- (instancetype)initWithCoder:(NSCoder *)decoder

0 commit comments

Comments
 (0)