summaryrefslogtreecommitdiff
path: root/platform/ios/app/MBXViewController.m
diff options
context:
space:
mode:
Diffstat (limited to 'platform/ios/app/MBXViewController.m')
-rw-r--r--platform/ios/app/MBXViewController.m7
1 files changed, 5 insertions, 2 deletions
diff --git a/platform/ios/app/MBXViewController.m b/platform/ios/app/MBXViewController.m
index 4ef8d05536..77f0e27e93 100644
--- a/platform/ios/app/MBXViewController.m
+++ b/platform/ios/app/MBXViewController.m
@@ -1919,11 +1919,14 @@ typedef NS_ENUM(NSInteger, MBXSettingsMiscellaneousRows) {
[self updateHUD];
// cameraDidChange called once here
- if ([_features count] >= _count && _count > 0){
+ if ([_features count] >= _count && _count > 0) {
[_features removeObjectAtIndex:0];
- _count = [_features count];
+// _count = [_features count];
MGLShapeCollectionFeature *collection = [MGLShapeCollectionFeature shapeCollectionWithShapes:_features];
_shapeSource.shape = collection;
+ _count -= 1;
+
+ // Uncomment this and the crash happens
// } else {
// _shapeSource.shape = nil;
// _count = 0;