summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Rex <julian.rex@mapbox.com>2019-09-18 16:15:14 -0400
committerJulian Rex <julian.rex@mapbox.com>2019-09-18 16:50:25 -0400
commitfdfe8b0fd065c0492baf32b09c21ace2d9067bec (patch)
tree976b54a1a000ffa10ecd875474e71773e5be36f1
parent861569e276013599deefaf5c9359779581b70a47 (diff)
downloadqtlocation-mapboxgl-fdfe8b0fd065c0492baf32b09c21ace2d9067bec.tar.gz
[ios, macos] Update change log. Adds @synchronized as a "just-in-case" precaution.
-rw-r--r--platform/darwin/src/MGLOfflinePack.mm10
-rw-r--r--platform/ios/CHANGELOG.md2
-rw-r--r--platform/macos/CHANGELOG.md2
3 files changed, 8 insertions, 6 deletions
diff --git a/platform/darwin/src/MGLOfflinePack.mm b/platform/darwin/src/MGLOfflinePack.mm
index 6648867a62..5f4ae9c838 100644
--- a/platform/darwin/src/MGLOfflinePack.mm
+++ b/platform/darwin/src/MGLOfflinePack.mm
@@ -137,11 +137,13 @@ private:
MGLAssert(_state != MGLOfflinePackStateInvalid, @"Cannot invalidate an already invalid offline pack.");
MGLAssert(self.mbglOfflineRegion, @"Should have a valid region");
- self.state = MGLOfflinePackStateInvalid;
- if (self.mbglOfflineRegion) {
- _mbglFileSource->setOfflineRegionObserver(*self.mbglOfflineRegion, nullptr);
+ @synchronized (self) {
+ self.state = MGLOfflinePackStateInvalid;
+ if (self.mbglOfflineRegion) {
+ _mbglFileSource->setOfflineRegionObserver(*self.mbglOfflineRegion, nullptr);
+ }
+ self.mbglOfflineRegion = nil;
}
- self.mbglOfflineRegion = nil;
}
- (void)setState:(MGLOfflinePackState)state {
diff --git a/platform/ios/CHANGELOG.md b/platform/ios/CHANGELOG.md
index 8b2e44821d..ca8230a433 100644
--- a/platform/ios/CHANGELOG.md
+++ b/platform/ios/CHANGELOG.md
@@ -24,7 +24,7 @@ Mapbox welcomes participation and contributions from everyone. Please read [CONT
* Fixed an issue with the appearance of the compass text in iOS 13. ([#15547](https://github.com/mapbox/mapbox-gl-native/pull/15547))
* Fixed a bug where the completion block passed to `-[MGLMapView flyToCamera:completionHandler:` (and related methods) wouldn't be called. ([#15473](https://github.com/mapbox/mapbox-gl-native/pull/15473))
* Fixed an issue of integer overflow when converting `tileCoordinates` to `LatLon`, which caused issues such as `queryRenderedFeatures` and `querySourceFeatures` returning incorrect coordinates at zoom levels 20 and higher. ([#15560](https://github.com/mapbox/mapbox-gl-native/pull/15560))
-* Fixed a crash when `-[MGLOfflinePack invalidate]` is called twice. ([#15582](https://github.com/mapbox/mapbox-gl-native/pull/15582))
+* Fixed a crash when `-[MGLOfflinePack invalidate]` is called on different threads. ([#15582](https://github.com/mapbox/mapbox-gl-native/pull/15582))
### User interaction
diff --git a/platform/macos/CHANGELOG.md b/platform/macos/CHANGELOG.md
index 8c3918244c..fc59457a26 100644
--- a/platform/macos/CHANGELOG.md
+++ b/platform/macos/CHANGELOG.md
@@ -19,7 +19,7 @@
* Fixed an issue of integer overflow when converting `tileCoordinates` to `LatLon`, which caused issues such as `queryRenderedFeatures` and `querySourceFeatures` returning incorrect coordinates at zoom levels 20 and higher. ([#15560](https://github.com/mapbox/mapbox-gl-native/pull/15560))
* Added an `-[MGLMapSnapshotter startWithOverlayHandler:completionHandler:]` method to provide the snapshot's current `CGContext` in order to perform custom drawing on `MGLMapSnapShot` objects. ([#15530](https://github.com/mapbox/mapbox-gl-native/pull/15530))
* Fixed an issue that `maxzoom` in style `Sources` option was ignored when URL resource is provided. It may cause problems such as extra tiles downloading at higher zoom level than `maxzoom`, or problems that wrong setting of `overscaledZ` in `OverscaledTileID` that will be passed to `SymbolLayout`, leading wrong rendering appearance. ([#15581](https://github.com/mapbox/mapbox-gl-native/pull/15581))
-* Fixed a crash when `-[MGLOfflinePack invalidate]` is called twice. ([#15582](https://github.com/mapbox/mapbox-gl-native/pull/15582))
+* Fixed a crash when `-[MGLOfflinePack invalidate]` is called on different threads. ([#15582](https://github.com/mapbox/mapbox-gl-native/pull/15582))
### Styles and rendering