summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>2015-03-09 19:30:10 +0100
committerTor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>2015-03-10 12:46:37 +0000
commit4c542ab592ccd409639aed30f0a5efc965a3c3c1 (patch)
tree5d7ef8248800e0c3e9c74ad99db7c7f4cf5fba16 /src/plugins
parent3ce88e13b9cc56e00bc3f075e9649c6b291ae01c (diff)
iOS: Handle an QIOSViewController outliving its related QIOSScreen
We release the UIWindow that retains QIOSViewController in the QIOSScreen destructor, but other parts of the OS may have retained the view controller, so the dealloc may not happen until later. In the meantime we may receive calls to shouldAutorotate, so we need to guard this code for the situation that m_screen has been deleted. Change-Id: Iefeb75f4fc698b5e80417ffd3a971b7de625bcd5 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/platforms/ios/qiosviewcontroller.mm2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/platforms/ios/qiosviewcontroller.mm b/src/plugins/platforms/ios/qiosviewcontroller.mm
index 02c3a2d28d..d144b419aa 100644
--- a/src/plugins/platforms/ios/qiosviewcontroller.mm
+++ b/src/plugins/platforms/ios/qiosviewcontroller.mm
@@ -238,7 +238,7 @@
-(BOOL)shouldAutorotate
{
- return m_screen->uiScreen() == [UIScreen mainScreen] && !self.lockedOrientation;
+ return m_screen && m_screen->uiScreen() == [UIScreen mainScreen] && !self.lockedOrientation;
}
#if QT_IOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__IPHONE_6_0)