Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix test app issues, add tests #2258

Merged
merged 10 commits into from
Apr 15, 2024
8 changes: 6 additions & 2 deletions platform/darwin/src/MLNComputedShapeSource.mm
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,12 @@ - (void)main {
featureCollection.push_back(geoJsonObject);
}
const auto geojson = mbgl::GeoJSON{featureCollection};
if(![self isCancelled] && self.rawSource) {
self.rawSource->setTileData(mbgl::CanonicalTileID(self.z, self.x, self.y), geojson);

// Note: potential race condition with `cancel`
if(![self isCancelled]) {
if (auto *rawSource = self.rawSource) {
rawSource->setTileData(mbgl::CanonicalTileID(self.z, self.x, self.y), geojson);
}
}
}
}
Expand Down
Loading
Loading