summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/webgl/qwebglintegration.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/webgl/qwebglintegration.cpp')
-rw-r--r--src/plugins/platforms/webgl/qwebglintegration.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/platforms/webgl/qwebglintegration.cpp b/src/plugins/platforms/webgl/qwebglintegration.cpp
index 58e4be0..dfae866 100644
--- a/src/plugins/platforms/webgl/qwebglintegration.cpp
+++ b/src/plugins/platforms/webgl/qwebglintegration.cpp
@@ -136,7 +136,8 @@ void QWebGLIntegration::initialize()
void QWebGLIntegration::destroy()
{
Q_D(QWebGLIntegration);
- foreach (QWindow *w, qGuiApp->topLevelWindows())
+ const auto tlws = qGuiApp->topLevelWindows();
+ for (QWindow *w : tlws)
w->destroy();
QWindowSystemInterface::handleScreenRemoved(d->screen);