summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2015-05-27 12:36:52 -0700
committerMinh Nguyễn <mxn@1ec5.org>2015-05-27 12:36:52 -0700
commita2986b2019b87d46099662cf6391dcb1b59e78d5 (patch)
treeaa888aa13782a6b4422ff74a0b1e9c1675b559d4
parent2ce4ae3047216d3e041d97646ba2cb94015862d7 (diff)
downloadqtlocation-mapboxgl-a2986b2019b87d46099662cf6391dcb1b59e78d5.tar.gz
Return nil upon failure to initialize
-rw-r--r--platform/ios/MGLMapView.mm3
1 files changed, 2 insertions, 1 deletions
diff --git a/platform/ios/MGLMapView.mm b/platform/ios/MGLMapView.mm
index fb8da76908..a959bce7bf 100644
--- a/platform/ios/MGLMapView.mm
+++ b/platform/ios/MGLMapView.mm
@@ -132,9 +132,10 @@ std::chrono::steady_clock::duration secondsAsDuration(float duration)
if (self && [self commonInit])
{
self.styleURL = styleURL;
+ return self;
}
- return self;
+ return nil;
}
- (instancetype)initWithCoder:(NSCoder *)decoder