summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Nichols <andy.nichols@digia.com>2013-10-31 13:34:57 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-04 15:56:24 +0100
commitc982fa3666385e87d968a9f2cad70cd906a3749d (patch)
tree7637f877bef1cb71333f9d2dcc2a2bba874dd557
parent84a318c74f11ffb198c394cb07f67d137b44a5df (diff)
iOS: Prevent calling QWindow methods on native NSViews
UIViews can return nil when calling qwindow, so we must check before trying to use the QWindow handle. Change-Id: I72e9ddc58ebe10a3e7ea511f2356650402ba23f4 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
-rw-r--r--src/plugins/platforms/ios/qioswindow.mm2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/platforms/ios/qioswindow.mm b/src/plugins/platforms/ios/qioswindow.mm
index 5a2a1122ec..0bfda49536 100644
--- a/src/plugins/platforms/ios/qioswindow.mm
+++ b/src/plugins/platforms/ios/qioswindow.mm
@@ -455,7 +455,7 @@ void QIOSWindow::raiseOrLower(bool raise)
for (int i = int(subviews.count) - 1; i >= 0; --i) {
UIView *view = static_cast<UIView *>([subviews objectAtIndex:i]);
- if (view.hidden || view == m_view)
+ if (view.hidden || view == m_view || !view.qwindow)
continue;
int level = static_cast<QIOSWindow *>(view.qwindow->handle())->m_windowLevel;
if (m_windowLevel > level || (raise && m_windowLevel == level)) {