summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/opengl/qgl_p.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h
index 7154545eb5..df099ea281 100644
--- a/src/opengl/qgl_p.h
+++ b/src/opengl/qgl_p.h
@@ -504,6 +504,7 @@ int QGLTextureCache::maxCost()
QGLTexture* QGLTextureCache::getTexture(QGLContext *ctx, qint64 key)
{
+ // Can't be a QReadLocker since QCache::object() modifies the cache (reprioritizes the object)
QWriteLocker locker(&m_lock);
const QGLTextureCacheKey cacheKey = {key, QGLContextPrivate::contextGroup(ctx)};
return m_cache.object(cacheKey);