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>
This commit is contained in:
parent
84a318c74f
commit
c982fa3666
@ -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)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user