aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/qsgrenderloop.cpp
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@digia.com>2013-11-18 08:53:13 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-12-12 08:55:35 +0100
commit91e2c5d749e38eed93e91b14151faa549e70080f (patch)
tree7f52a4f1a1106f1e03ebe2b78a9344f646d73762 /src/quick/scenegraph/qsgrenderloop.cpp
parent2818f64cafe1ea249288ca8f572081fc58a10111 (diff)
Safeguard QQuickWindow::hide() against other GL contexts.
If another GL context is bound to another surface on the GUI thread, we can run into issues while cleaning up the SG nodes. Task-number: QTBUG-34898 Change-Id: Ifa02b7cdbc7ab38b3a149a21452cc5071498a7d1 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Diffstat (limited to 'src/quick/scenegraph/qsgrenderloop.cpp')
-rw-r--r--src/quick/scenegraph/qsgrenderloop.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/quick/scenegraph/qsgrenderloop.cpp b/src/quick/scenegraph/qsgrenderloop.cpp
index 52df55fa92..ac1bdb7841 100644
--- a/src/quick/scenegraph/qsgrenderloop.cpp
+++ b/src/quick/scenegraph/qsgrenderloop.cpp
@@ -238,6 +238,8 @@ void QSGGuiThreadRenderLoop::hide(QQuickWindow *window)
m_windows.remove(window);
QQuickWindowPrivate *cd = QQuickWindowPrivate::get(window);
+ if (gl)
+ gl->makeCurrent(window);
cd->cleanupNodesOnShutdown();
if (m_windows.size() == 0) {