Android: Don't crash if the screen is not yet initialized.
Change-Id: I4751c2dec5780f42b348a8a8ea628f65d548dcec Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
This commit is contained in:
parent
8d1ab25ed2
commit
684a952edb
@ -559,8 +559,10 @@ static void setSurface(JNIEnv *env, jobject /*thiz*/, jobject jSurface)
|
||||
|
||||
QPlatformScreen *screen = m_androidPlatformIntegration->screen();
|
||||
QRect geometry(QPoint(0, 0), size);
|
||||
QWindowSystemInterface::handleScreenAvailableGeometryChange(screen->screen(), geometry);
|
||||
QWindowSystemInterface::handleScreenGeometryChange(screen->screen(), geometry);
|
||||
if (screen) {
|
||||
QWindowSystemInterface::handleScreenAvailableGeometryChange(screen->screen(), geometry);
|
||||
QWindowSystemInterface::handleScreenGeometryChange(screen->screen(), geometry);
|
||||
}
|
||||
|
||||
if (!sameNativeWindow) {
|
||||
m_surfaceMutex.unlock();
|
||||
|
Loading…
Reference in New Issue
Block a user