eglfs: Destroy screens after windows

Screens must be destroyed after windows otherwise the application will
crash on QEglFSWindow::destroy() because the screen is NULL.

Change-Id: I315ddc267dd0d2dd2a1c4f3a0c319c8f2c11ec28
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
This commit is contained in:
Pier Luigi Fiorini 2015-06-27 19:51:30 +02:00 committed by Laszlo Agocs
parent a7f2af0911
commit 11370f0a43

View File

@ -106,8 +106,11 @@ void QEglFSIntegration::initialize()
void QEglFSIntegration::destroy()
{
foreach (QWindow *w, qGuiApp->topLevelWindows())
w->destroy();
qt_egl_device_integration()->screenDestroy();
QEGLPlatformIntegration::destroy();
if (display() != EGL_NO_DISPLAY)
eglTerminate(display());
qt_egl_device_integration()->platformDestroy();
}