From 57ca7d85eec35cd67c4d849eb6fd4e0cb3f9faaa Mon Sep 17 00:00:00 2001 From: Julian Rex Date: Fri, 26 Apr 2019 19:37:05 -0400 Subject: [PATCH] [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]; }