Android: REG: Fix crash.
Test if the window has a handle before using it. Change-Id: I728a129722f8ecd021998d483530a8d1687e5fe3 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
This commit is contained in:
parent
5721c0811a
commit
66bd87e5c6
@ -238,9 +238,11 @@ void QAndroidPlatformScreen::setAvailableGeometry(const QRect &rect)
|
||||
QList<QWindow *> windows = QGuiApplication::allWindows();
|
||||
for (int i = 0; i < windows.size(); ++i) {
|
||||
QWindow *w = windows.at(i);
|
||||
QRect geometry = w->handle()->geometry();
|
||||
if (geometry.width() > 0 && geometry.height() > 0)
|
||||
QWindowSystemInterface::handleExposeEvent(w, QRegion(geometry));
|
||||
if (w->handle()) {
|
||||
QRect geometry = w->handle()->geometry();
|
||||
if (geometry.width() > 0 && geometry.height() > 0)
|
||||
QWindowSystemInterface::handleExposeEvent(w, QRegion(geometry));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user