aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph
diff options
context:
space:
mode:
authorGiulio Camuffo <giuliocamuffo@gmail.com>2014-03-16 11:32:30 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-17 08:39:07 +0100
commit1bec5e806c909d723994dab46271dfe6f60db6cd (patch)
tree85bbd526c851c26699fab4d69b33844b91b7da6c /src/quick/scenegraph
parent4ef1032a4e5b0e612fb2d440fb3ef82fd5af3c5a (diff)
Unset the current gl window when deleted
This does in the QSGGuiThreadRenderLoop what 403045a did for the QSGThreadedRenderLoop. Fix a memory corruption in Mesa's dri2 EGL when setting a window current after deleting the previous current one. Change-Id: I8df0bacdf12f71e969a9ea39842a402c9a2a303f Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Diffstat (limited to 'src/quick/scenegraph')
-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 37df425e55..bd9c7609ad 100644
--- a/src/quick/scenegraph/qsgrenderloop.cpp
+++ b/src/quick/scenegraph/qsgrenderloop.cpp
@@ -311,6 +311,8 @@ void QSGGuiThreadRenderLoop::windowDestroyed(QQuickWindow *window)
QCoreApplication::sendPostedEvents(0, QEvent::DeferredDelete);
delete gl;
gl = 0;
+ } else if (window == gl->surface()) {
+ gl->doneCurrent();
}
}