From 72768c089a431eafcc816413c247c8b8d896fdce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Tue, 28 May 2013 15:43:05 +0200 Subject: Fixed crashes in QGLTextureDestroyer. QGLTextureDestroyer will try to make the context current on the GUI thread, regardless of whether it is owned by another thread. Use QOpenGLSharedResourceGuard instead which does the right thing and takes shared contexts into account. Task-number: QTBUG-31403 Change-Id: I1377f9284995a7ba5af32c85296eef152fc035c8 Reviewed-by: Gunnar Sletta --- src/opengl/qgl.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/opengl/qgl.cpp') diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index 72c6e035d9..3f496a4ffc 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -1579,10 +1579,7 @@ QGLContextPrivate::QGLContextPrivate(QGLContext *context) { group = new QGLContextGroup(context); - if (qApp) { - texture_destroyer = new QGLTextureDestroyer; - texture_destroyer->moveToThread(qApp->thread()); - } + texture_destroyer = new QGLTextureDestroyer; } QGLContextPrivate::~QGLContextPrivate() -- cgit v1.2.3