From 57ca7d85eec35cd67c4d849eb6fd4e0cb3f9faaa Mon Sep 17 00:00:00 2001 From: Julian Rex Date: Fri, 26 Apr 2019 19:37:05 -0400 Subject: [PATCH 1/2] [ios] Check for valid superview to avoid crash on iOS 9 --- platform/ios/src/MGLMapView.mm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm index cadf5be3fd9..345ac64bc7e 100644 --- a/platform/ios/src/MGLMapView.mm +++ b/platform/ios/src/MGLMapView.mm @@ -1377,7 +1377,10 @@ - (void)didMoveToWindow - (void)didMoveToSuperview { [self validateDisplayLink]; - [self installConstraints]; + if (self.superview) + { + [self installConstraints]; + } [super didMoveToSuperview]; } From e9784084509a55c9ab99682ff113ea1fb33f95dd Mon Sep 17 00:00:00 2001 From: Julian Rex Date: Tue, 30 Apr 2019 15:26:45 -0400 Subject: [PATCH 2/2] [ios] Added changelog entry --- platform/ios/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/platform/ios/CHANGELOG.md b/platform/ios/CHANGELOG.md index 0269d20041e..d3f6a7b5fb4 100644 --- a/platform/ios/CHANGELOG.md +++ b/platform/ios/CHANGELOG.md @@ -8,6 +8,7 @@ Mapbox welcomes participation and contributions from everyone. Please read [CONT * Fix a bug that wrong position of attribution dialog after rotation. ([#14185](https://github.com/mapbox/mapbox-gl-native/pull/14185)) * Fixed a bug with jittery callout views when using sprite-based annotations. ([#14445](https://github.com/mapbox/mapbox-gl-native/pull/14445)) * Improved `MGLLocationManager` optional protocol properties briding to Swift. ([#14477](https://github.com/mapbox/mapbox-gl-native/pull/14477)) +* Fixed a layout constraints crash on iOS 9 when a view is removed from its superview. ([#14529](https://github.com/mapbox/mapbox-gl-native/pull/14529)) ## 4.10.0 - April 17, 2019