From 2ffc1a329aaa35a6cc4fb437ecee5d8f0e325997 Mon Sep 17 00:00:00 2001 From: Fabian Guerra Date: Mon, 21 May 2018 16:38:32 -0400 Subject: [PATCH] [ios, macos] Fix featuresInCoordinateBounds cpu usage when features are empty. --- platform/darwin/src/MGLComputedShapeSource.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/darwin/src/MGLComputedShapeSource.mm b/platform/darwin/src/MGLComputedShapeSource.mm index 04734d0ef50..5f5427838f7 100644 --- a/platform/darwin/src/MGLComputedShapeSource.mm +++ b/platform/darwin/src/MGLComputedShapeSource.mm @@ -125,7 +125,7 @@ - (void)main { zoomLevel:self.z]; } - if(![self isCancelled]) { + if(![self isCancelled] && data.count > 0) { mbgl::FeatureCollection featureCollection; featureCollection.reserve(data.count); for (MGLShape * feature in data) {