summaryrefslogtreecommitdiffstats
path: root/src/platformsupport/eglconvenience/qeglplatformintegration.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/platformsupport/eglconvenience/qeglplatformintegration.cpp')
-rw-r--r--src/platformsupport/eglconvenience/qeglplatformintegration.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/platformsupport/eglconvenience/qeglplatformintegration.cpp b/src/platformsupport/eglconvenience/qeglplatformintegration.cpp
index a6207cf402..10913ef094 100644
--- a/src/platformsupport/eglconvenience/qeglplatformintegration.cpp
+++ b/src/platformsupport/eglconvenience/qeglplatformintegration.cpp
@@ -95,15 +95,7 @@ QEGLPlatformIntegration::QEGLPlatformIntegration()
QEGLPlatformIntegration::~QEGLPlatformIntegration()
{
- foreach (QWindow *w, qGuiApp->topLevelWindows())
- w->destroy();
-
- delete m_screen;
-
- if (m_display != EGL_NO_DISPLAY)
- eglTerminate(m_display);
- destroy();
}
void QEGLPlatformIntegration::initialize()
@@ -126,7 +118,13 @@ void QEGLPlatformIntegration::initialize()
void QEGLPlatformIntegration::destroy()
{
+ foreach (QWindow *w, qGuiApp->topLevelWindows())
+ w->destroy();
+
+ delete m_screen;
+ if (m_display != EGL_NO_DISPLAY)
+ eglTerminate(m_display);
}
QAbstractEventDispatcher *QEGLPlatformIntegration::createEventDispatcher() const