diff options
author | Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> | 2015-06-27 19:51:30 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@theqtcompany.com> | 2015-06-30 08:11:29 +0000 |
commit | 11370f0a43bc2912b529573689941fe88446ff0f (patch) | |
tree | 1793730e467534be78059fc2fdf832ba5956fe57 /src/plugins/platforms/eglfs | |
parent | a7f2af09114cfa0996794c85bc48a601f665772d (diff) |
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>
Diffstat (limited to 'src/plugins/platforms/eglfs')
-rw-r--r-- | src/plugins/platforms/eglfs/qeglfsintegration.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/plugins/platforms/eglfs/qeglfsintegration.cpp b/src/plugins/platforms/eglfs/qeglfsintegration.cpp index d1688df8f5..5eb8485dc7 100644 --- a/src/plugins/platforms/eglfs/qeglfsintegration.cpp +++ b/src/plugins/platforms/eglfs/qeglfsintegration.cpp @@ -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(); } |