summaryrefslogtreecommitdiff
path: root/platform/darwin/src/MGLStyleValue.mm
diff options
context:
space:
mode:
authorFredrik Karlsson <bjorn.fredrik.karlsson@gmail.com>2016-12-07 17:19:15 +0100
committerGitHub <noreply@github.com>2016-12-07 17:19:15 +0100
commit508f020eb5f8665e9cb53fb319440216d134e299 (patch)
tree613fc7cb875819ad21e545e145b9a7150a3fba46 /platform/darwin/src/MGLStyleValue.mm
parent3b7e98d0b126fdc97ba0ae21412ac35508ccf5b0 (diff)
downloadqtlocation-mapboxgl-508f020eb5f8665e9cb53fb319440216d134e299.tar.gz
Prevent stopless functions (#7309)
* [ios, macos] prevent stopless functions * [ios, macos] removed unused bridging header and fixed naming
Diffstat (limited to 'platform/darwin/src/MGLStyleValue.mm')
-rw-r--r--platform/darwin/src/MGLStyleValue.mm4
1 files changed, 4 insertions, 0 deletions
diff --git a/platform/darwin/src/MGLStyleValue.mm b/platform/darwin/src/MGLStyleValue.mm
index 43b51d6788..6ced819cd1 100644
--- a/platform/darwin/src/MGLStyleValue.mm
+++ b/platform/darwin/src/MGLStyleValue.mm
@@ -63,6 +63,10 @@
- (instancetype)initWithBase:(CGFloat)base stops:(NSDictionary *)stops {
if (self = [super init]) {
+ if (!stops.count)
+ {
+ [NSException raise:NSInvalidArgumentException format:@"%@ requires at least one stop.", self];
+ }
_base = base;
_stops = stops;
}