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();
|
QList<QWindow *> windows = QGuiApplication::allWindows();
|
||||||
for (int i = 0; i < windows.size(); ++i) {
|
for (int i = 0; i < windows.size(); ++i) {
|
||||||
QWindow *w = windows.at(i);
|
QWindow *w = windows.at(i);
|
||||||
QRect geometry = w->handle()->geometry();
|
if (w->handle()) {
|
||||||
if (geometry.width() > 0 && geometry.height() > 0)
|
QRect geometry = w->handle()->geometry();
|
||||||
QWindowSystemInterface::handleExposeEvent(w, QRegion(geometry));
|
if (geometry.width() > 0 && geometry.height() > 0)
|
||||||
|
QWindowSystemInterface::handleExposeEvent(w, QRegion(geometry));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user