summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/ios
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@digia.com>2015-01-20 16:17:12 +0100
committerTor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>2015-02-02 16:19:08 +0000
commitd6327d5dc81ae2e9da69665365226786c777ddc1 (patch)
tree3ac74509d2689754a02809315130b697e8cab8b6 /src/plugins/platforms/ios
parent3d4a2241b910811bead57ba1556227ab70385b7b (diff)
iOS: Track QIOSViewController -> QIOSScreen using QPointer
We may receive viewWillLayoutSubviews calls for the view controller even if QIOSScreen has released the UIWindow that retains the view controller. Change-Id: I0cc7c50dbb5ee00224aec46d070b04efe069e85a Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Diffstat (limited to 'src/plugins/platforms/ios')
-rw-r--r--src/plugins/platforms/ios/qiosviewcontroller.mm7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/plugins/platforms/ios/qiosviewcontroller.mm b/src/plugins/platforms/ios/qiosviewcontroller.mm
index ee36c3f3a8..1e1ac4ba18 100644
--- a/src/plugins/platforms/ios/qiosviewcontroller.mm
+++ b/src/plugins/platforms/ios/qiosviewcontroller.mm
@@ -58,7 +58,7 @@
@interface QIOSViewController () {
@public
- QIOSScreen *m_screen;
+ QPointer<QIOSScreen> m_screen;
BOOL m_updatingProperties;
QMetaObject::Connection m_focusWindowChangeConnection;
}
@@ -334,7 +334,8 @@
if (!QCoreApplication::instance())
return;
- m_screen->updateProperties();
+ if (m_screen)
+ m_screen->updateProperties();
}
// -------------------------------------------------------------------------
@@ -344,7 +345,7 @@
if (!isQtApplication())
return;
- if (!m_screen->screen())
+ if (!m_screen || !m_screen->screen())
return;
// For now we only care about the main screen, as both the statusbar